DROP DATABASE
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]
Remarks
-
<database_
is the name of a SingleStore local storage database.name> -
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. -
This 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. -
This command cannot be run on system databases.
-
This 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: January 11, 2023