Insert into a view

You can insert rows into a view only if the view is modifiable and contains no derived columns. The reason for the second restriction is that an inserted row must provide values for all columns, but the database server cannot tell how to distribute an inserted value through an expression. An attempt to insert into the response view, as the previous example shows, would fail.

When a modifiable view contains no derived columns, you can insert into it as if it were a table. The database server, however, uses NULL as the value for any column that is not exposed by the view. If such a column does not allow NULL values, an error occurs, and the insert fails.

Another mechanism for inserting rows (or performing UPDATE or DELETE operations) on views, including complex views, is to create INSTEAD OF triggers, as described in the HCL OneDB™ Guide to SQL: Syntax.