CREATE SCHEMA
Use the CREATE SCHEMA
command to create a new schema.
Syntax
CREATE SCHEMA [IF NOT EXISTS] [database_name.]schema_name;
Parameters
Parameter or clause | Description |
---|---|
schema_name | The name of the schema to be created. |
IF NOT EXISTS clause | Creates a schema if the schema name has not already been used. Otherwise throws an error. |
database_name | The name of the database for the schema to be created in. If not specified, the schema will be created in the default database dev . |
Example
CREATE SCHEMA IF NOT EXISTS schema_1;
note
Names and unquoted identifiers are case-insensitive. Therefore, you must double-quote any of these fields for them to be case-sensitive. See also Identifiers.