Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer
Removes a column from a table.
To drop multiple columns from a table, see drop multiple table columns.
Note
This command does not physically delete the data, and does not reduce the cost of storage for data that was already ingested.
Warning
This command is irreversible. All data in the column that is removed will no longer by queryable. Future commands to add that column back will not be able to restore the data.
You must have at least Table Admin permissions to run this command.
.drop
column
TableName.
ColumnName [ifexists
]
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
TableName | string |
✔️ | The name of the table containing the column to drop. |
ColumnName | string |
✔️ | The name of the column to drop. |
ifexists |
string |
If specified, the command won't fail on a non-existent column. |
The following command will drop the Value
column from the Test
table, if such a column exists. If the column doesn't exist, the command will not fail.
.drop column Test.Value ifexists
Removes multiple columns from a table.
Note
This command does not physically delete the data, and does not reduce the cost of storage for data that was already ingested.
Warning
This command is irreversible. All data in the column that is removed will no longer by queryable. Future commands to add those columns back will not be able to restore the data.
.drop
table
TableName columns
(
ColumnName [,
...] )
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
TableName | string |
✔️ | The name of the table containing the column to drop. |
ColumnName | string |
✔️ | The name of the column to drop. |
The following command will drop the Value
and Item
columns from the Test
table.
.drop table Test columns ( Value, Item )