SQL Reference

ALTER VIEW

The ALTER VIEW statement modifies an existing view by altering a reference type column to add a scope.

Invocation

This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (SQLSTATE 42509).

Authorization

The privileges held by the authorization ID of the statement must include at least one of the following:

Syntax

>>-ALTER VIEW--view-name---------------------------------------->
 
      .---------------------------------------------------------------------.
      V         .-COLUMN-.                                                  |
>--------ALTER--+--------+----column-name--ADD SCOPE--+-typed-table-name-+--+>
                                                      '-typed-view-name--'
 
>--------------------------------------------------------------><
 

Description

view-name
Identifies the view to be changed. It must be a view described in the catalog.

ALTER COLUMN column-name
Is the name of the column to be altered in the view. The column-name must identify an existing column of the view (SQLSTATE 42703). The name cannot be qualified.

ADD SCOPE
Add a scope to an existing reference type column that does not already have a scope defined (SQLSTATE 428DK). The column must not be inherited from a superview (SQLSTATE 428DJ).

typed-table-name
The name of a typed table. The data type of column-name must be REF(S), where S is the type of typed-table-name (SQLSTATE 428DM). No checking is done of any existing values in column-name to ensure that the values actually reference existing rows in typed-table-name.

typed-view-name
The name of a typed view. The data type of column-name must be REF(S), where S is the type of typed-view-name (SQLSTATE 428DM). No checking is done of any existing values in column-name to ensure that the values actually reference existing rows in typed-view-name.
i.cp


[ Top of Page | Previous Page | Next Page ]