Views

There are two basic types of views in SQL Server 2005: standard views and indexed views. A standard view is a virtual table based on the result set of a SELECT statement. A view contains rows and columns just like a real table. The fields in a view are fields from one or more real tables or other views in the database. You can add T-SQL arguments to a view definition as with any SELECT statement, such as WHERE, JOIN, and UNION, to present the data as if the data was coming from a single table. In a standard view, the database does not store the view data. The view is actually a predefined SQL statement that the database engine executes and retrieves dynamically when the view is referenced. A view can be used inside a query, a stored procedure, ...

Get Microsoft® SQL Server™ 2005 Administrator's Companion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.