Skip to main content

DROP DATABASE

The DROP statement removes a database entry added previously with the CREATE command.

By default (or if the RESTRICT clause is provided), the entry will not be dropped if there are any existing database shares that were created from it. If the CASCADE clause is provided then all the shares that are dependent on the database will be dropped as well.

Syntax

DROP DATABASE [IF EXISTS] <database name> [CASCADE | RESTRICT];

Example usage

DROP DATABASE ducks; -- drops database named `ducks`
DROP DATABASE ducks CASCADE; -- drops database named `ducks` and all the shares created from `ducks`