On this page
Drops a database.
DROP DATABASE [IF EXISTS] <database_name> [FORCE]DROP SCHEMA [IF EXISTS] <database_name> [FORCE]
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
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.
Refer to the Permission Matrix for the required permission.
Dropping a Database in a Workspace
DROP DATABASE in a workspace can be only done from the primary R/W database.
DROP DATABASE IF EXISTS test;
DROP DATABASE IF EXISTS db FORCE;
Last modified: January 11, 2023