RENAME COLUMN
Function
The ALTER TABLE ... RENAME COLUMN command is used to change the column name.
Syntax
ALTER TABLE tableName RENAME COLUMN old_columnName TO new_columnName
Parameter Description
Parameter |
Description |
---|---|
tableName |
Table name. |
old_columnName |
Old column name. |
new_columnName |
New column name. |
Example
ALTER TABLE table1 RENAME COLUMN a.b.c TO x
a.b.c indicates the full path of a nested column. For details about the nested column rules, see ADD COLUMNS.
After the column name is changed, the change is automatically synchronized to the column comment. The comment is in rename oldName to newName format.
Response
You can run the DESCRIBE command to view the new column name.
Feedback
Was this page helpful?
Provide feedbackThank 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