Top Posters
Since Sunday
79
20
16
15
12
10
10
9
9
8
8
8
New Topic  
wrote...
Posts: 202
5 months ago
The following database will be used in this question:

GENERAL SALES DATABASE:

SALESREP
SalesRepNoRepNameHireDate
654Jones01/02/2005
734Smith02/03/2007
345Chen01/25/2018
434Johnson11/23/2004

CUSTOMER
CustNoCustNameBalanceSalesRepNo
9870Winston500345
8590Gonzales350434
7840Harris800654
4870Miles100345

What is an SQL view, and what is it used for? Include an example based on the CUSTOMER table of the General Sales Database.
Textbook 
Database Processing: Fundamentals, Design, and Implementation
Edition: 15th
Authors:
Read 28 times
1 Reply
Replies
Answer verified by a subject expert
wrote...
Posts: 204
5 months ago
Sign in or Sign up in seconds to unlock everything.
An SQL view is a virtual table constructed from database tables or other views. It is based on the SQL CREATE VIEW command and uses the SQL SELECT statement to construct the view. However, the ORDER BY clause cannot be used when creating a view. For example:

CREATE VIEW CustomerNameOnly AS
SELECT CustName
FROM CUSTOMER;

A view may be used to (1) hide columns or rows, (2) show the results of computed columns, (3) hide complicated SQL statements such as joins, (4) layer built-in functions, (5) provide a level of indirection between the data processed by applications and the actual table data, (6) assign different processing permissions to different views of the same table, and (7) assign different triggers to different views of the same table.
This verified answer contains over 210 words.
Related Topics
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers.
Learn More
Improve Grades
Help Others
Save Time
Accessible 24/7
  86 People Browsing
Related Images
 98
 68
 95