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;

Help us make this doc better!