Drop Database

Important

This documentation has been retired and might not be updated. The products, services, or technologies mentioned in this content are no longer supported. See DROP SCHEMA.

DROP [DATABASE | SCHEMA] [IF EXISTS] db_name [RESTRICT | CASCADE]

Drop a database and delete the directory associated with the database from the file system. If the database does not exist, an exception is thrown.

IF EXISTS

If the database to drop does not exist, nothing happens.

RESTRICT

Dropping a non-empty database triggers an exception. Enabled by default.

CASCADE

Dropping a non-empty database also drops all associated tables and functions.