Skip to main content
Creates a new schema in the current database. Schemas are logical namespaces that organize tables, views, and other database objects. Every database includes a default schema named public. You can create additional schemas to separate and organize objects by function, team, or access level.

Syntax

Parameters

All identifiers are case-insensitive unless enclosed in double-quotes. For more information, see Object identifiers.

Examples

Create a schema
Create a schema only if it does not already exist
Create objects within a schema After creating a schema, you can create tables, views, and other objects inside it by qualifying the object name with the schema:
Reference objects using two-part and three-part identifiers You can reference objects using a two-part identifier (schema.object) when the database context is already set, or a three-part identifier (database.schema.object) to fully qualify the object across databases: