You can use the DROP DATABASE syntax to delete a specified database.
Applicable engines and versions
The DROP DATABASE syntax is applicable to LindormTable and LindormTSDB.
The DROP DATABASE syntax is supported by LindormTable 2.2.16 and later versions.
The DROP DATABASE syntax is supported by all versions of LindormTSDB.
Syntax
drop_database_statement ::= DROP DATABASE [ IF EXISTS ] database_identifierUsage notes
LindormTable 2.2.16 and later versions also support the
DROP SCHEMA [ IF NOT EXISTS ] schema_identifiersyntax, which is equivalent to the DROP DATABASE syntax.LindormTable versions earlier than 2.2.16 support only the
DROP SCHEMA [ IF NOT EXISTS ] schema_identifiersyntax but do not support the DROP DATABASE syntax.SCHEMAis the alias ofDATABASE. After you create a database, the database is indicated byDATABASEby default.You cannot drop the database named
default.
Examples
Delete the database named DB1.
DROP DATABASE IF EXISTS DB1;