DROP TABLE permanently deletes a table and all its data from the current database. This operation cannot be undone.
Applicable engines
LindormTable and LindormTSDB.
Syntax
drop_table_statement ::= DROP TABLE [ IF EXISTS ] table_identifierUsage notes
LindormTable
After
DROP TABLEruns, the table schema and data are deleted immediately. Storage space is released asynchronously in the background. Use this command with caution.If your LindormTable instance version is between 2.2.16 and 2.4.1, run
OFFLINE TABLEfirst to set the table state to offline before runningDROP TABLE.
LindormTSDB
To purge data, configure a Time To Live (TTL) property on the database. The system checks the TTL for each database approximately every five minutes. For details, see ALTER DATABASE.
Examples
Delete a table
DROP TABLE IF EXISTS sensor;