DROP DATABASE
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
On this page
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 DATABASE
command waits for the running queries to finish before dropping the database.To override this behavior and kill any running queries, use the FORCE
option. -
The
DROP DATABASE
command 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 DATABASE
command cannot be run on system databases. -
The
DROP DATABASE
command 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 Permission Matrix for the required permission.
Examples
DROP DATABASE IF EXISTS test;
DROP DATABASE IF EXISTS db FORCE;
Last modified: October 24, 2024