ALTER VIEW statement
The ALTER VIEW statement defines changes to be made to an existing view definition.
ALTER VIEW viewOwner 1 .viewName 1 | This option specifies the fully qualified name of the view to be modified. | ||||||||
---|---|---|---|---|---|---|---|---|---|
QUALIFIED | This option indicates whether the view was created with a qualified name. QUALIFIED parameter values
| ||||||||
OWNER viewOwner 2 | This option specifies the new owner of the view. | ||||||||
NAME viewName 2 | This option specifies the new name of the view. | ||||||||
CHECK OPTION | This option specifies the new check option for the view. Views that reference global temporary tables cannot specify CHECK OPTION. CHECK OPTION parameter values
| ||||||||
COMMENT 'string' | This option defines a comment for the view. | ||||||||
NOCOMMENT | This option removes an existing comment. | ||||||||
LABEL 'string' | This option defines a label for the view. | ||||||||
NOLABEL | This option removes an existing label. | ||||||||
COLCOMMENT columnName 'string' | This option defines a comment 'string' on columnName. | ||||||||
NOCOLCOMMENT columnName | This option removes an existing column comment from columnName. | ||||||||
COLLABEL columnName 'string' | This option defines a label 'string' on columnName. | ||||||||
NOCOLLABEL columnName | This option removes an existing column label from columnName. | ||||||||
COLUMNS (columnName, ...) | This option specifies the names of the columns to be included in the view. | ||||||||
NOCOLUMNS | This option removes the column list from the view definition. Columns appear in the order that is specified in the SELECT clause. | ||||||||
ALTER COLUMN columnName 1 (NAME columnName 2) | This option specifies a new name for a column. | ||||||||
ALTER COLUMN columnName 1 (MOVE BEFORE columnName 3) | Moves a column before another column. | ||||||||
ALTER COLUMN columnName 1 (MOVE AFTER columnName 3) | Moves a column after another column. | ||||||||
ADD COLUMN columnName 1 BEFORE columnName 2 | This option adds a new column before another column. | ||||||||
ADD COLUMN columnName 1 AFTER columnName 2 | This option adds a new column after another column. | ||||||||
DROP COLUMN columnName | This option removes a column. | ||||||||
PATH (schemaList) | This option specifies the path for this view. | ||||||||
AS SELECT subselect | This option defines a new SQL subselect statement as the definition for the view. If specified, the new select statement must appear last in the ALTER VIEW statement, after any other clauses. |
Related topic