Updating Through Views

If a view is built on a single table, the view is updatable if the SELECT statement that defines the view does not contain any of the following elements:
  • Columns in the projection list that are aggregate values
  • Columns in the projection list that use the UNIQUE or DISTINCT keyword
  • A GROUP BY clause
  • A UNION operator
  • A query that selects calculated or literal values.

You can DELETE from a view that selects calculated values from a single table, but INSERT and UPDATE operations are not valid on such views.

In an updatable view, you can update the values in the underlying table by inserting values into the view. If a view is built on a table that has a derived value for a column, however, that column is not updatable through the view. Other columns in the view, however, can be updated.

See also Updating Views for information about using INSTEAD OF triggers to update views that are based on more than one table or that include columns containing aggregates or other calculated values.
Important: You cannot update or insert rows in a remote table through views that were created using the WITH CHECK OPTION keywords.