Considerations For Create View; Reserved View Names; Effect Of Adding A Column On View Definitions; Authorization And Availability Requirements - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

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. This query-expr cannot contain non-ISO88591 string literals. For
the syntax description of query-expr, see
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.

Authorization and Availability Requirements

To create a view, you must have select privileges for the objects underlying the view.
When you create a view on a single table, the owner of the view is automatically given all
privileges WITH GRANT OPTION on the view. However, when you create a view that spans
multiple tables, the owner of the view is given only SELECT privileges WITH GRANT OPTION.
If you try to grant privileges to another user on the view other than SELECT you will receive a
warning that you lack the grant option on that privilege.

Updatable and Non-Updatable Views

Single table views can be updatable. Multi-table views cannot be updatable.
88
SQL Statements
"SELECT Statement" (page
141).

Advertisement

Table of Contents
loading

Table of Contents