DROP COLUMN
Function
The ALTER TABLE ... DROP COLUMN command is used to delete a column.
Syntax
ALTER TABLE tableName DROP COLUMN|COLUMNS cols
Parameter Description
| Parameter | Description |
|---|---|
| tableName | Table name. |
| cols | Columns to be deleted. You can specify multiple columns. |
Required Permissions
- SQL permissions
| Permission Description |
|---|
| ALTER permission on a table |
- Fine-grained permission: dli:table:alter
- Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.
Example
ALTER TABLE table1 DROP COLUMN a.b.c ALTER TABLE table1 DROP COLUMNS a.b.c, x, y
a.b.c indicates the full path of a nested column. For details about the nested column rules, see ADD COLUMNS.
Response
You can run the DESCRIBE command to check which column is deleted.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot