CREATE SCHEMA Statement
This statement creates a schema—i.e., a named group of related objects. A schema is a collection of tables, views, and permissions granted to specific users or roles. According to the ANSI standard, specific object permissions are not schema objects in themselves and do not belong to a specific schema. However, roles are sets of privileges that do belong to a schema.
Supported (as CREATE DATABASE)
Supported, with variations
Supported, with limitations
CREATE SCHEMA [
owner_name] [DEFAULT CHARACTER SET
schema_name[, ...]] [ ANSI CREATE
statements[...] ] [ ANSI GRANT
Creates a schema called
schema_name. When omitted, the database will create a schema name for you using the name of the user who owns the schema.
Specifies the user who will be the owner of the schema. When this clause is omitted, the current user is set as the owner. The ANSI standard allows you to omit either the
schema_name or the AUTHORIZATION clause, or to use them both together.
Declares a default character set of
char_set_name for all objects created within the schema.
schema_name[, . . . ]
Optionally declares a file path and filename for any unqualified routines (i.e., stored procedures, user-defined functions, user-defined methods) in the schema.