1.

What is an execution plan in SQL server?

Answer»

The answer to this question depends on the View type. There are two types of Views that exist. One is Simple View created from a single table and which does not have any DERIVED columns based on in-built grouping functions like average, sum, etc and the other one is a complex View. We can delete ROWS from views if it is a simpler one but not from Complex one. Let me try to make you understand by going into VIEW definition and syntax.

In SQL, a view is a virtual table dependent on the outcome set of a SQL query. A view contains rows much the same as a real physical table. The fields in a view are fields from at least one real table in the database. You can include SQL functions, WHERE, and JOIN clauses to a view and present the INFORMATION as THOUGH the information were originating from one single table.

There are two types of views that exist. One is the normal one (derived from a single table) and the other one is a complex one (derived from multiple tables). We can delete/update data from view only when it is a normal one and does not have any derived columns based on AVG, COUNT, SUM, MIN, MAX, etc. We can not delete rows from a complex view.



Discussion

No Comment Found