RENAME COLUMN in BigQuery
In BigQuery, we can rename an existing column in a table by using the ALTER TABLE … RENAME COLUMN DDL statement.
SQL Syntax
ALTER TABLE mydataset.mytable RENAME COLUMN old_name TO new_name;
Note: Columns used in table partitioning or clustering cannot be renamed.
Example: Rename a column in an existing table.
SQL
ALTER TABLE `ashishcoder.Coding_Dataset.clustered_table` RENAME COLUMN order_id TO customer_order_id;
The above query renames the order_id column to customer_order_id.