Modify with a view

You can modify views as if they were tables. Some views can be modified and others not, depending on their SELECT statements. The restrictions are different, depending on whether you use DELETE, UPDATE, or INSERT statements.

You can modify a view if the SELECT statement that defined it did not contain any of the following items:
  • A join of two or more tables
  • An aggregate function or the GROUP BY clause
  • The DISTINCT keyword or its synonym, UNIQUE
  • The UNION keyword
  • Calculated or literal values

When a view avoids all these restricted features, each row of the view corresponds to exactly one row of one table. By using INSTEAD OF triggers, you can circumvent these restrictions on the view if the trigger action modifies the base table.