Using Views

Views can be thought of as virtual tables because the result sets returned by views have the same general form as a table, with columns and rows, and views can be referenced much like tables in queries. Several types of views can be created. Most views are used to join data from multiple tables so that it can be accessed in a single result set. For example, you could create a CustOrder view that gets the customer’s first name, last name, address, account number, and telephone number from the Customers table and the last order details from the Orders table, which makes the information more manageable for your company’s sales representatives.

Views can be created from other views as well, which allows you to extract subsets of data from ...

Get Microsoft® SQL Server® 2008 Administrator's Pocket Consultant now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.