ALTER SCHEMA

Changes the definition of an existing schema.

Syntax

ALTER SCHEMA schema_name RENAME TO new_schema_name
ALTER SCHEMA schema_name OWNER TO new_owner

Description

ALTER SCHEMA can be used to rename an existing schema, or to change its owner.

When renaming it, the new schema name must be a valid identifier.

Please note that renaming of the default schema (def_schema) is not allowed.

Example

ALTER SCHEMA my_schema_old_name RENAME TO my_schema_new_name
ALTER SCHEMA my_schema OWNER TO business_user

See Also

CREATE SCHEMA

DROP SCHEMA

SHOW SCHEMAS