Page tree
Skip to end of metadata
Go to start of metadata

Drops an existing schema.

Syntax

DROP SCHEMA schema_name [RESTRICT|CASCADE]

Description

The default behavior is RESTRICT, which means that the schema drop will fail if the schema is not empty (tables/views/join indexes/range indexes still exists).

To force dropping the schema with all the existing objects in it, use the CASCADE option.

The default schema (def_schema) cannot be deleted.

Example

DROP SCHEMA my_new_schema CASCADE

See Also

ALTER SCHEMA

CREATE SCHEMA

SHOW SCHEMAS

  • No labels