DROP DATABASE deletes a specified database.
Applicable engines and versions
| Engine | Supported versions |
|---|---|
| LindormTable | 2.2.16 and later |
| LindormTSDB | All versions |
Syntax
DROP DATABASE [ IF EXISTS ] database_identifierUsage notes
SCHEMAis an alias forDATABASE. After you create a database, it is identified asDATABASEby default.LindormTable 2.2.16 and later also accepts the equivalent syntax:
DROP SCHEMA [ IF NOT EXISTS ] schema_identifier.LindormTable versions earlier than 2.2.16 support only
DROP SCHEMA [ IF NOT EXISTS ] schema_identifierand do not supportDROP DATABASE.The
defaultdatabase cannot be dropped.
Example
Drop the database named DB1. If the database does not exist, the statement completes without returning an error.
DROP DATABASE IF EXISTS DB1;