DROP DATABASE
Drops a database.
Note
This command does not drop remote storage databases. To do that, use DETACH DATABASE.
Syntax
DROP DATABASE [IF EXISTS] <database_name> [FORCE] DROP SCHEMA [IF EXISTS] <database_name> [FORCE]
Remarks
<database_name>
is the name of a SingleStore local storage database.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 theFORCE
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 SingleStoreDB Commands).
This command causes implicit commits. See 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.
See the Permission Matrix for the required permission.
Examples
DROP DATABASE IF EXISTS test;
DROP DATABASE IF EXISTS db FORCE;