NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-156
CREATE VIEW Statement
CREATE VIEW Statement
CREATE VIEW is a DDL statement that creates a view.
view
specifies a Guardian name for the view (or an equivalent DEFINE). The fully
expanded view name must be unique among object names in the network.
The volume on which the view is created must be audited by the TMF subsystem,
even if the view itself is nonaudited.
[ ( new-name [ , new-name ] ... ) ]
specifies names for the columns of the view and, optionally, headings for the
columns. If you do not specify this clause, columns in the view have the same
names as the columns in the select list of select-statement.
No two columns of the view can have the same name; if a view refers to more than
one table and the select list refers to columns from different tables with the same
name, you must specify new names for columns that would otherwise have
duplicate names.
new-name is:
new-column-name [ HEADING string | NO HEADING ]
new-column-name
is an SQL identifier that is not a reserved word and that is unique among column
names for the view. Column names in the list must match one-for-one with columns
in the select-list of the AS select-statement clause.
CREATE VIEW view [ ( new-name [ , new-name ] ... ) ]
AS select-statement
[| FOR PROTECTION |]
[| SIMILARITY CHECK { ENABLE | DISABLE } |]
[| CATALOG catalog-name |]
[| SECURE "rwep" |]
[| WITH CHECK OPTION |]
[| WITH HEADINGS |]
[| WITH HELP TEXT |]
new-name is:
new-column-name [ HEADING string | NO HEADING ]