What Are Views?
A view is a named virtual table that is defined by a query and used as a table. Unlike permanent tables, a view has no physical representation of its data unless you create an index on it. Whenever you issue a query against a nonindexed view, SQL Server in practice has to access the underlying tables. Unless specified otherwise, the discussions in this chapter involve nonindexed views.
When you create a view, you specify a name for the view and a query. Microsoft SQL Server stores only metadata information about the view, describing the object, its columns, security, dependencies, and so on. When you query a view–by retrieving or modifying data–the query processor replaces a view reference with its definition; in other words, the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access