Skip to main content

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 clauseDescription
schema_nameThe name of the schema to be created.
IF NOT EXISTS clauseCreates a schema if the schema name has not already been used. Otherwise throws an error.
database_nameThe 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.

Help us make this doc better!