ODBC Server Reference Manual
Transact-SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
4-58
CREATE VIEW
CREATE VIEW
Use CREATE VIEW to create a view.
The file security for the view is obtained from the default permissions associated with
the user’s logon name.
The CREATE VIEW statement has the following syntax:
view-name
specifies the name of the view to create.
You can specify the owner of a view, but you cannot specify the database or qualify
the object name (view name). You can create a view for the current database only.
column-name
specifies an alternate column name for a column of the view. The column-name
must be unique for columns defined in the view.
If you omit the column-name list, the column names of the view take the names
from the columns in the select list of the SELECT statement.
query-expression
defines the columns for the view and sets the selection criteria. Unless you declare
alternate column names in the column-name clause, the column names you
specify in the query expression define the column names of the view.
A query expression consists of a single query-specification or a union of
multiple query specifications.
query-specification
is a SELECT statement that defines the columns for the view and sets the
selection criteria. Unless you declare alternate column names in the column-
identifier list, the column names you specify in the query-specification
define the column names of the view.
CREATE VIEW view-name
[ ( column-name [, column-name ] ... ) ]
AS query-expression
query-expression is:
{ query-expression UNION [ALL] query-expression }
{ ( query-expression ) }
{ query-specification }