Sql updating a view
When used in the subquery of a DML statement, you can specify this clause in a subquery in the can be a subquery, a column, a function, or a collection constructor.Regardless of its form, it must return a collection value—that is, a value whose type is nested table or varray.The indexed view can be used in a query execution in two ways.The query can reference the indexed view directly, or, more importantly, the query optimizer can select the view if it determines that the view can be substituted for some or all of the query in the lowest-cost query plan.The returning clause retrieves the rows affected by a DML statement.You can specify this clause for tables and materialized views and for views with a single base table.In the Developer and Enterprise editions of SQL Server 20, the query processor can use an indexed view to solve queries that structurally match the view, even if they don't refer to the view by name.
Much of the discussion also applies to SQL Server 2000.This allows existing applications to benefit from the newly created indexed views without changing those applications.Note Indexed views are a feature of all versions of SQL Server 20.When a view is referenced in the FROM clause of another query, this metadata is retrieved from the system catalog and expanded in place of the view's reference.After view expansion, the SQL Server query optimizer compiles a single execution plan for the executing query.
This process of extracting the elements of a collection is called refers to a LOB object attribute, then you must first initialize it with a value of empty or null. Also, if you are updating a LOB value using some method other than a direct to set the column to the value previously specified as the default value for the column.