你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

.drop table command

Applies to: ✅ Microsoft FabricAzure Data Explorer

Removes one or more tables from the database.

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.

Permissions

You must have at least Table Admin permissions to run this command.

Syntax

.drop table TableName [ifexists]

.drop tables (TableName [, ... ]) [ifexists]

Learn more about syntax conventions.

Parameters

Name Type Required Description
TableName string ✔️ The name of the table to drop.
ifexists string If specified, the command won't fail if the table doesn't exist.

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.

Examples

Drop a single table

.drop table CustomersTable ifexists

Drop multiple tables

.drop tables (ProductsTable, ContactsTable, PricesTable) ifexists