You are here: Reference Information > SQL Reference Information > SQL Statements > CREATE SCHEMA

CREATE SCHEMA

CREATE SCHEMA — define a new schema

Syntax

CREATE SCHEMA schema_name

Description

CREATE SCHEMA enters a new schema into the current database. The schema name must be distinct from the name of any existing schema in the current database. A schema is essentially a namespace. It contains named objects, including tables, views, domains and stored procedures, whose names may duplicate those of other objects in other schemas. You access named objects by qualifying their names with the schema name as a prefix. The default behavior is that the creator of the schema and a user assigned the DBA role can create tables, views, domains and sequences in that schema. To give this privilege to another user, use the GRANT statement (see GRANT). CREATE statement that specifies an unqualified object name creates the object in the current schema. You can also create a schema by declaring it with the USE statement (see USE). To remove a schema, specify DROP SCHEMA (see DROP SCHEMA).

Parameters

Example

CREATE SCHEMA newSchema;