.drop table and .drop tables
Removes a table or multiple tables from the database.
Requires table admin permission.
Note
The .drop table command only soft deletes the data. That is, data can't be queried, but is still recoverable from persistent storage. The underlying storage artifacts are hard-deleted according to the recoverability property in the retention policy that was in effect at the time the data was ingested into the table.
Syntax
.drop table TableName [ifexists]
.drop tables (TableName1, TableName2,..) [ifexists]
Note
If ifexists is specified, the command won't fail if there is a non-existent table.
Example
.drop table CustomersTable ifexists
.drop tables (ProductsTable, ContactsTable, PricesTable) ifexists
Returns
This command returns a list of the remaining tables in the database.
| Output parameter | Type | Description |
|---|---|---|
| TableName | String | The name of the table. |
| DatabaseName | String | The database that the table belongs to. |