ALTER SCHEMA
Description
The ALTER SCHEMA statement is used to adjust the name, properties, and comments of a specified schema. With this statement, you can update the comments and properties of a schema to adapt to changes in data processing needs and organizational structure.
Modify Schema Name
Syntax:
Modify Schema Comments
To modify the schema comments, use the following syntax:
Example
-
Modify the comment of the
rc4_lschema torc7:After executing this statement, use the
DESCcommand to verify that the comment was successfully modified:Expected output:
Modify Schema Properties
In addition to modifying comments, you can also set or update properties for the schema. Use the following syntax:
Example
-
Set the attribute
custom_propertytotruefor therc4_lschema:Check whether the schema attribute was set successfully:
The properties section in the expected output should contain the newly set properties:
Permission Requirements
The user executing the ALTER SCHEMA statement must have the ALTER permission for the corresponding schema. If the user does not have the appropriate permissions, the operation will be denied.
