Knowee
Questions
Features
Study Tools

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

🧐 Not the exact question you are looking for?Go ask a question

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:

  1. 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.

  2. SELECT * FROM salesman: This part of the command selects all columns from the 'salesman' table.

  3. 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.

This problem has been solved

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.)

1/1

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.