Updating views in sql
COUNTRIES group by continent; You can embed a SAS LIBNAME statement or a SAS/ACCESS LIBNAME statement in a view by using the USING LIBNAME clause.When PROC SQL executes the view, the stored query assigns the libref.For SAS/ACCESS librefs, PROC SQL establishes a connection to a DBMS.The scope of the libref is local to the view and does not conflict with any identically named librefs in the SAS session.To save the extra step, specify the view in-line, enclosed in parentheses, in the FROM clause. An in-line view produces a table internally that the outer query uses to select data.Unlike views that are created with the CREATE VIEW statement, in-line views are not assigned names and cannot be referenced in other queries or SAS procedures as if they were tables.The advantage of embedded librefs is that you can store engine-host options and DBMS connection information, such as passwords, in the view.That, in turn, means that you do not have to remember and reenter that information when you want to use the libref.
Multiple clauses can be specified, separated by commas.To use an indexed view in all other editions, the NOEXPAND table hint must be used.Indexed views work best when the underlying data is infrequently updated.Indexed views can be created in any edition of SQL Server 2008.
In SQL Server 2008 Enterprise, the query optimizer automatically considers the indexed view.
All such queries will be faster because they only have to retrieve the small number of rows in the view instead of reading the full number of rows from the base tables.