NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-159
Considerations—CREATE VIEW
HEADING or NO HEADING clause in new-column-name, no heading is
inherited. A view column that is a function or an expression cannot inherit a
heading.
WITH HELP TEXT
specifies that help text for a view column is inherited from an underlying base table
or view. A view column that is a function or an expression cannot inherit help text.
Considerations—CREATE VIEW
Authorization and access requirements
CREATE VIEW requires authority to write to the catalog that receives the view
description and to the USAGES tables of catalogs describing the underlying tables
and views.
To create a protection view, you must also be a generalized owner of the underlying
table. Any partitions or indexes of the table underlying the protection view must be
accessible when you create the view. To specify write access for a protection view,
you must have authority to write to the underlying table and all associated indexes
unless you are the super ID. To specify read access for a protection view, you must
have authority to read the underlying table and all associated indexes unless you are
the super ID. For protection views managed by ServerWare SMF, view must be the
same type of name, virtual or direct, as the underlying table.
Only one DDL statement can operate on a given SQL object (or partition of an SQL
object) at a time. An error occurs if you attempt to execute a CREATE VIEW
statement while another process is executing a DDL operation on the same object.
The specific error depends on the DDL operation involved and the phase of the
operation at which the conflict occurs. (See DDL (Data Definition Language)
Statements on page D-19 for more information.)
Length of the CREATE VIEW statement
The CREATE VIEW statement, including any name expansion from the use of
asterisks in column, view, and table specifications, can have a maximum of 3,000
bytes.
Data type of view columns
The data types of the columns of the view are inherited from the columns of the
table or view in which they are defined.
Number of columns allowed in a view
A view can have as many as 200 to 400 columns, depending on the size of the
column definitions. The column definitions for the view must fit in a file label.
Protection views
A protection view and the underlying table must both be on the same volume and
must both be described in the same catalog. If the table is partitioned, then the