Schema Name (schema_name)

You can define assignment of an object to a schema by specifying the name of the schema.


<schema_name> ::= <identifier>

The identifier may not exceed 32 characters in length.


Schemas create namespaces for database objects.

When a user is created using the CREATE USER statement, a schema, the name of which is identical to the user name, is created implicitly.

When a schema is created using the CREATE SCHEMA statement, the schema name and owner of the schema can be specified explicitly. If no owner is specified, the current user becomes the owner of the schema.

Each schema has a maximum of one owner. The owner of the schema can create, change, and delete objects in his own schema, since he or she is granted the relevant privileges implicitly. The owner can also grant these privileges to other users.

Schemas can be created that do not correspond to a user name. The database user DAVID can create the schemas A, B, and C and be the owner of all these. A database user A, B, or C need not exist.

See also:

CREATE SCHEMA Statement (create_schema_statement)

GRANT Statement (grant_statement)

RENAME SCHEMA Statement (rename_schema_statement)

SET Statement (set_statement)

DROP SCHEMA Statement (drop_schema_statement)