Neoview SQL Reference Manual (R2.4)

CREATE VIEW Statement
“Syntax Description of CREATE VIEW”
“Considerations for CREATE VIEW”
“Examples of CREATE VIEW”
The CREATE VIEW statement creates a Neoview SQL view. See “Views” (page 292).
CREATE VIEW view
[(column-name ] [,column-name ...)]
AS query-expr
[WITH [CASCADED] CHECK OPTION]
query-expr is:
non-join-query-expr | joined-table
non-join-query-expr is:
non-join-query-primary | query-expr UNION [ALL] query-term
query-term is:
non-join-query-primary | joined-table
non-join-query-primary is:
simple-table | (non-join-query-expr)
joined-table is:
table-ref [NATURAL] [join-type] JOIN table-ref [join-spec]
join-type is:
INNER | LEFT [OUTER] | RIGHT [OUTER]
join-spec is:
ON condition
simple-table is:
VALUES (row-value-const) [,(row-value-const)]...
| TABLE table
| SELECT [ALL | DISTINCT] select-list
FROM table-ref [,table-ref]...
[WHERE search-condition]
[SAMPLE sampling-method]
[TRANSPOSE transpose-set [transpose-set]...
[KEY BY key-colname]]...
[SEQUENCE BY colname [ASC[ENDING] | DESC[ENDING]]
[,colname [ASC[ENDING] | DESC[ENDING]]]...]
[GROUP BY {colname | colnum} [,{colname | colnum}]...]
[HAVING search-condition]
[[FOR] access-option ACCESS]
[ORDER BY [column-list | select-index-list
row-value-const is:
row-subquery | expression [,expression]...
access-option is:
READ COMMITTED
| READ UNCOMMITTED
| REPEATABLE READ
| SERIALIZABLE
Syntax Description of CREATE VIEW
view
specifies the name of the view. See “Database Object Names” (page 228).
CREATE VIEW Statement 99