SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-168
CREATE VIEW Statement
The FROM clause can refer to one table (with a correlation name, if desired),
but cannot refer to another view.
The WHERE clause can refer only to columns in its select list.
The select list cannot include expressions or functions and cannot refer to
duplicate column names.
The statement cannot be combined with another SELECT statement using a
UNION operator and cannot include subqueries, the keyword DISTINCT, or the
GROUP BY or HAVING clause.
If select-statement includes a UNION operator, the view cannot be updated
and the view cannot participate in an inner or outer join.
If select-statement includes a LEFT JOIN operator, the view can be specified
only on the lefthand side of the first LEFT JOIN.
If SMF is installed on your node, any table to which the view refers must have
either a virtual or direct name.
FOR PROTECTION
specifies a protection view. If you omit this clause, the view is a shorthand view.
SIMILARITY CHECK { ENABLE | DISABLE }
authorizes or prohibits similarity checks on a protection view. (You cannot specify
this clause unless you also specify the FOR PROTECTION clause.) The default is
SIMILARITY CHECK DISABLE.
Views that authorize similarity checks (SIMILARITY CHECK ENABLE) have
version 310 or later. Such views cannot be registered in catalogs with old versions
or accessed by older versions of NonStop SQL/MP.
CATALOG catalog
specifies the catalog to hold the description of the view. catalog is the name of
the subvolume that contains the catalog and that is on the same node as the view.
For a protection view, catalog must be the catalog that holds the description of
the underlying table. (If the table is partitioned, the protection view is partitioned,
too, and each partition of the protection view is registered in the same catalog as
the corresponding partition of the table.)
The default is the current default catalog.
SECURE "rwep"
defines the security assigned to the view. The default is the default security of the
user whose process creates the view.
Security is interpreted differently for protection and shorthand views. For protection
views, you must ensure that users who have write access also have read access.