DROP SCHEMA
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
The DROP SCHEMA statement drops the specified schema and its collection of database objects (that were defined in the CREATE SCHEMA command).
The DROP SCHEMA statement has the following format:
DROP SCHEMA schema_name RESTRICT | CASCADE
RESTRICT
Does not drop the schema if one or more objects are associated with it.
CASCADE
Deletes all objects (tables, views, grants) that are associated with the schema.
Embedded Usage
In an embedded DROP SCHEMA statement, schema_name cannot be specified using a host string variable. Schema_name can be specified as the target of a dynamic SQL statement string.
Permissions
You must own the schema.
Last modified date: 08/28/2024