statement

DROP SCHEMA

Removes a namespace. RESTRICT refuses removal when dependent objects prevent it; do not use CASCADE casually. Example target: PostgreSQL 17. Use only the isolated starter dataset; setup and expected results are in the batch evidence.

Formal Syntax & Structure

sql syntaxsql
DROP SCHEMA name [RESTRICT]

Working Example

Example Snippetsql
CREATE SCHEMA lab;DROP SCHEMA lab RESTRICT;
SQL Reference