Adding a Column
Function
This statement is used to add one or more new columns to a table.
Syntax
1 | ALTER TABLE [db_name.]table_name ADD COLUMNS (col_name1 col_type1 [COMMENT col_comment1], ...);
|
Precautions
None
Example
1 | ALTER TABLE t1 ADD COLUMNS (column2 int, column3 string);
|
Last Article: Modifying a Table
Next Article: Syntax for Partitioning a Table
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.