Show TOC

RENAME SCHEMA Statement (rename_schema_statement)Locate this document in the navigation structure

Use

The RENAME SCHEMA statement ( rename_schema_statement) changes the name of a schema.

Structure
				
<rename_schema_statement>::=
  RENAME SCHEMA <schema_name> TO <new_schema_name>

<new_schema_name>::=
  <schema_name>
				
			

Examples

SQL Tutorial, Schemas

Explanation

The schema to be changed must already exist and cannot identify a user. The schema name must identify a schema whose owner is the current database user.

The new schema name ( new_schema_name) must not be identical to the name of an existing database user, user group, schema or role.

All objects dependent on the schema to be changed are adjusted by the database system to the new schema name.