DROP SCHEMA

statementsupportedDatabases & schemas

docs.snowflake.com ↗

Object: SCHEMA

Removes a schema from the current/specified database.

Syntax

supportedpartialnot supportednot scored

DROP SCHEMA [ IF EXISTS ] <name> [ CASCADE | RESTRICT ]

Parameters

NameRequiredDescription
nameSpecifies the identifier for the schema to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. If the schema identifier is not fully-qualified (in the form of db_name.schema_name), the command looks for the schema in the current database for the session.
CASCADE | RESTRICTSpecifies whether the schema can be dropped if foreign keys exist that reference any tables in the schema: CASCADE drops the schema and all objects in the schema, including tables with primary/unique keys that are referenced by foreign keys in other tables. RESTRICT returns a warning about existing foreign key references and does not drop the schema. Default: CASCADE

Usage notes

See also

Referenced by