Open topic with navigation
CREATE SCHEMA — create a new schema
CREATE SCHEMA creates a new schema. 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
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
Name of a schema to be created. This name must be unique in the set of schemas in the current database.
CREATE SCHEMA newSchema;