From the following table, create a view 'newyorkstaff' to display details of salesmen who are based in New York.Sample table: salesman
Question
From the following table, create a view 'newyorkstaff' to display details of salesmen who are based in New York.
Sample table:
salesman
Solution
It seems like you're asking for a SQL command to create a view based on certain conditions. Here's how you can do it:
CREATE VIEW newyorkstaff AS
SELECT * FROM salesman
WHERE city = 'New York';
This command does the following:
-
CREATE VIEW newyorkstaff AS
: This part of the command creates a new view named 'newyorkstaff'. A view in SQL is a virtual table based on the result-set of an SQL statement. -
SELECT * FROM salesman
: This part of the command selects all columns from the 'salesman' table. -
WHERE city = 'New York'
: This is the condition for the view. Only the rows where the city is 'New York' will be included in the view.
Similar Questions
In a sales organization, regional sales managers typically report into a director of sales.Group of answer choicestruefalse PreviousNext
Write a query to display all the customers whose ID is 2001 below the salesperson ID of Mc Lyon.
The personal presentation by the firm's sales force for the purpose of making sales and building customer relationships is called:
In a table for customers, the information about a single customer resides in a single:Question 6Answera.tableb.rowc.fieldd.column
Identify at least three sales role types best for your personality. (For example, advertising sales, team sales, medical device sales, etc.)
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.