Description
The CREATE VIEW statement uses a SELECT statement to define the contents of a virtual table. The view definition is stored in the system catalogs. When the view is used in a statement, the statement operates on the underlying tables. When a table or view used in the definition of a view is dropped, the view is also dropped.
Data can be selected from a view the same way data is selected from a base table. However, updates, inserts, and deletes on views are subject to several restrictions. Updates, inserts, and deletes are allowed only if the view meets all the following conditions:
• The view is based on a single updatable table or view.
• All columns see columns in the base table or view (no aggregate functions or derived columns are allowed).
• The SELECT statement omits DISTINCT, GROUP BY, UNION, and HAVING clauses.
Inserts are not allowed if a mandatory (not null not default) column in a base table is omitted from the view.
A maximum of 1024 columns can be specified for a view.
Note: This statement has additional considerations when used in a distributed environment. For more information, see the Ingres Star User Guide.