In the previous chapters, base tables were used to describe DDL and DML statements. A base table contains data stored on the disk. By contrast, views, by default, do not exist physically—that is, their content is not stored on the disk. (This is not … [Read more...] about DDL Statements and Views – Creating a View
Views
Altering and Removing Views
The Transact-SQL language supports the nonstandard ALTER VIEW statement, which is used to modify the definition of the view query. The syntax of ALTER VIEW is analogous to that of the CREATE VIEW statement.You can use the ALTER VIEW statement to … [Read more...] about Altering and Removing Views
View Retrieval, INSERT Statement and a View
A view is used exactly like any base table of a database. You can think of selecting from a view as if the statement were transformed into an equivalent operation on the underlying base table(s). Example 11.9 shows this.Example 11.9The … [Read more...] about View Retrieval, INSERT Statement and a View
UPDATE Statement, DELETE Statement and Views
UPDATE Statement and a ViewA view can be used with the UPDATE statement as if it were a base table. When a view is used to modify rows, the content of the underlying base table is actually modified.Example 11.14 creates a view that is then … [Read more...] about UPDATE Statement, DELETE Statement and Views
Indexed Views – Creating an Indexed View
As you already know from the previous chapter, there are several special index types. One of them is the indexed view, which will be described next.A view always contains a query that acts as a filter. Without indices created for a particular … [Read more...] about Indexed Views – Creating an Indexed View
Editing Information Concerning Indexed Views
You can use the sessionproperty property function to test whether one of the options of the SET statement is activated (see the earlier section “Creating an Indexed View” for a list of the options). If the function returns 1, the setting is ON. … [Read more...] about Editing Information Concerning Indexed Views