Progress
SQL-92
Guide and Reference
CREATE VIEW Statement
Creates a view with the specified name on existing tables or views.
SYNTAX
owner_name
Owner of the created view
( column_name, column_name,... )
Specifies column names for the view. These names provide an alias for the columns selected by the query specification. If the column names are not specified, then the view is created with the same column names as the tables or views on which it is based.
WITH CHECK OPTION
Checks that the updated or inserted row satisfies the view definition. The row must be selectable using the view. The
WITH
CHECK
OPTION
clause is only allowed on an updatable view.NOTES
EXAMPLE
- A view is deletable if deleting rows from that view is allowed. For a view to be deletable, the view definition has to satisfy the following conditions:
- A view is updatable if updating rows from that view is allowed. For a view to be updatable, the view has to satisfy the following conditions:
- A view is insertable if inserting rows into that view is allowed. For a view to be insertable, the view has to satisfy the following conditions:
- The view is updatable (it satisfies all the conditions specified above for updatability).
- If the first FROM clause contains a table reference, then all NOT NULL columns of the table are selected in the first SELECT clause of the view definition.
- If the first FROM clause contains a view reference, then the view referred to is insertable.
AUTHORIZATION
Must have DBA privilege, RESOURCE privilege, or SELECT privilege
SQL COMPLIANCE
SQL-92, ODBC Core SQL grammar
ENVIRONMENT
Embedded SQL, interactive SQL, ODBC applications, JDBC applications
RELATED STATEMENTS
"Query Expressions" in "SQL-92 Language Elements", DROP VIEW Statement
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |