Important
Self-managed SingleStore will soon transition from version 9.1 RC to version 10. This new semantic versioning scheme will provide SingleStore with finer control over engine and feature releases that were not possible with the current versioning scheme.
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 prior to its general availability. Ahead of this transition, SingleStore 9.0 is recommended for production workloads, which can later be upgraded to SingleStore 10.
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: