Neoview SQL Reference Manual (R2.4)

(column-name [,column-name ]...)
specifies names for the columns of the view and, optionally, headings for the columns. Column
names in the list must match one-for-one with columns in the table specified by query-expr.
If you omit this clause, columns in the view have the same names as the corresponding
columns in query-expr. You must specify this clause if any two columns in the table
specified by query-expr have the same name or if any column of that table does not have
a name. For example, this query expression SELECT MAX(salary), AVG(salary) AS
average_salary FROM employee the first column does not have a name.
column-name
specifies the name for a column in the view. column-name is an SQL identifier.
column-name must be unique among column names in the view and cannot be a reserved
word. It can contain a reserved word if it is delimited.
If you do not specify this clause, columns in the view have the same names as the columns
in the select list of query-expr.
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.
AS query-expr
specifies the columns for the view and sets the selection criteria that determines the rows
that make up the view. For information about character string literals, see “Character String
Literals” (page 256). For the syntax description of query-expr, see “SELECT Statement”
(page 162).
WITH [CASCADED] CHECK OPTION
specifies that no row can be inserted or updated in the database through the view unless the
row satisfies the view definition—that is, the search condition in the WHERE clause of the
query expression must evaluate to true for any row that is inserted or updated.
If you omit this option, a newly inserted row or an updated row need not satisfy the view
definition, which means that such a row can be inserted or updated in the table but does not
appear in the view. This check is performed each time a row is inserted or updated.
WITH CHECK OPTION does not affect the query expression; rows must always satisfy the
view definition. CASCADED is an optional keyword; WITH CHECK OPTION has the same
effect.
Considerations for CREATE VIEW
You can specify GROUP BY using ordinals to refer to the relative position within the SELECT
list. For example, GROUP BY 3, 2, 1.
Dynamic parameters are not allowed.
Reserved View Names
View names prefixed by the name of a UMD table are reserved. You cannot create views with
such names. For example, you cannot create a view named HISTOGRAMS_MYVIEW.
Effect of Adding a Column on View Definitions
The addition of a column to a table has no effect on any existing view definitions or conditions
included in constraint definitions. Any implicit column references specified by SELECT * in view
or constraint definitions are replaced by explicit column references when the definition clauses
are originally evaluated.
100 SQL Statements