Important
The SingleStore 9.1 release candidate (RC) is available now. It will be promoted to general availability (GA) soon and at that time it will be renamed to SingleStore 10.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10, while SingleStore 9.0 is recommended for production workloads.
DROP DATABASE
On this page
The DROP DATABASE command drops a database.
Note
This command does not drop remote storage databases.
Syntax
DROP DATABASE [IF EXISTS] <database_name> [FORCE]DROP SCHEMA [IF EXISTS] <database_name> [FORCE]
Arguments
-
<database_: The name of a SingleStore local storage database.name>
Remarks
-
By default, the
DROP DATABASEcommand waits for the running queries to finish before dropping the database.To override this behavior and kill any running queries, use the FORCEoption. -
The
DROP DATABASEcommand can be run on the master aggregator node, or a child aggregator node when DDL Forwarding is enabled.See Node Requirements for SingleStore Commands). -
This command causes implicit commits.
Refer to COMMIT for more information. -
The
DROP DATABASEcommand cannot be run on system databases. -
The
DROP DATABASEcommand drops the Point-In-Time Recovery (PITR) history.A database cannot be restored to the PITR milestone taken before the database was dropped. -
Refer to the Permissions Matrix for the required permissions.
Examples
DROP DATABASE IF EXISTS test;
DROP DATABASE IF EXISTS db FORCE;
Last modified: