ALTER MATERIALIZED VIEW
Syntax
ALTER {MATERIALIZED VIEW | MV} mv-name mv-alter-action
mv-alter-action is:
RENAME TO new-name
Description
This statement renames an MV.
Options
mv-name
- Specifies the current name of the MV. mv-name is in the [catalog-name.][schema-name.]mv-name form, where each part of the name is a valid SQL identifier. It can have maximum 128 characters.
RENAME TO
-
Changes the ANSI name of the object.
new-name
-
Specifies the new name of the MV. The new-name can have maximum 128 characters.
Permissions
To alter an MV, you must own the schema or be the super ID or object owner or have ALTER permission on the schema containing the MV.
Consideration
The new ANSI name must be unique within the schema.
Example command
>>ALTER MATERIALIZED VIEW CAT.SCH.HR_DETAILS RENAME TO HR_INFO;
--- SQL operation complete.