Creates a new schema.
where schema-name-clause is:
where schema-element is:
A new schema is created with the name specified in schema-name-clause. If schema-name is specified, the schema is created with that name, otherwise the name of the schema will be the same as ident-name.
If ident-name is specified, the schema and all the other objects created by the CREATE SCHEMA statement are created with the named ident as the effective current ident.
A schema-element is a CREATE or GRANT statement that is specified using the normal syntax for such a statement and which is executed by the CREATE SCHEMA statement in the normal way.
create-table-statement, see CREATE TABLE.
create-view-statement, see CREATE VIEW.
create-index-statement, see CREATE INDEX.
create-domain-statement, see CREATE DOMAIN.
create-sequence-statement, see CREATE SEQUENCE.
create-synonym-statement, see CREATE SYNONYM.
grant-statement, see GRANT ACCESS PRIVILEGE or GRANT OBJECT PRIVILEGE.
The schema name must not be the same as that of a schema which already exists in the database.
CREATE SCHEMA requires that the current ident has SCHEMA or IDENT privilege.
The value for ident-name is currently restricted to be the name of the current ident.
A grant-statement is restricted to GRANT ACCESS PRIVILEGE, GRANT USAGE ON DOMAIN or GRANT USAGE ON SEQUENCE (i.e. it is only possible to grant privileges on private database objects).
If a schema-element contains a CREATE statement where the name of the object to be created is specified in its fully qualified form (i.e. schema_name.object_name), the schema-name component must be the same as the name of the schema being created by the CREATE SCHEMA statement.
If a schema-element contains a CREATE statement where the name of the object to be created is specified in an unqualified form, it will be created in the schema created by the CREATE SCHEMA statement (and not the schema with the same name as the current ident as is usual for CREATE statements).
It is possible for one schema-element to reference the objects created by other schema-element's regardless of the order of creation of the objects. All object references are verified at the conclusion of the CREATE SCHEMA statement when all the schema-element's have been executed and all objects have been created.
ExampleCREATE SCHEMA mimer_store_music;
For more information, see the Mimer SQL User's Manual, Creating Idents and Schemas.
SQL-2003 Core Fully compliant. SQL-2003 Features outside core Feature F691, "Collations and translations" support for CREATE COLLATION statement in schema definition.Feature F251, "Domain support" support for CREATE DOMAIN statement in schema definition.Feature F171, "Multiple schemas per user" support for schema name-clause. Mimer SQL extension Support for CREATE INDEX, CREATE SEQUENCE and CREATE SYNONYM statements in a schema definition is a Mimer SQL extension.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40