Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > CREATE VIEW >

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:

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.

Related Information

Related statements: CREATE TABLE , CREATE TRIGGER, DROP VIEW , GRANT, REVOKE,SELECT, and SET SESSION AUTHORIZATION

For a discussion of views, see the IBM Informix Database Design and Implementation Guide.

For a discussion of how to use privileges and views to restrict access to the database, see the IBM Informix Guide to SQL: Tutorial.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]