All Products
Search
Document Center

Lindorm:DROP DATABASE

Last Updated:Apr 08, 2024

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_identifier

Usage notes

  • LindormTable 2.2.16 and later versions also support the DROP SCHEMA [ IF NOT EXISTS ] schema_identifier syntax, which is equivalent to the DROP DATABASE syntax.

  • LindormTable versions earlier than 2.2.16 support only the DROP SCHEMA [ IF NOT EXISTS ] schema_identifier syntax but do not support the DROP DATABASE syntax.

  • SCHEMA is the alias of DATABASE. After you create a database, the database is indicated by DATABASE by default.

  • You cannot drop the database named default.

Examples

Delete the database named DB1.

DROP DATABASE IF EXISTS DB1;