Skip to main content

DROP

DROP SCHEMA​

Deletes a schema (database) with the specified name.
The default behavior is RESTRICT.

Overview​

DROP SCHEMA [ IF EXISTS ] schema_name [ CASCADE | RESTRICT ]

Parameters​

[ IF EXISTS ]​
  • Suppresses the error if the specified schema does not exist.
[ CASCADE | RESTRICT ]​
  • CASCADE: Deletes the schema along with all contained objects.
  • RESTRICT: Deletes the schema only if it contains no objects.

DROP TABLE​

Deletes a table with the specified name.

Overview​

DROP TABLE [ IF EXISTS ] table_name

Parameters​

[ IF EXISTS ]​
  • Suppresses the error if the specified table does not exist.