Updated on 2024-05-20 GMT+08:00

Renaming a Partition in a Partitioned Table

You can run ALTER TABLE RENAME PARTITION to rename a partition in a partitioned table.

For example, rename the partition date_202001 in the range partitioned table range_sales by specifying the partition name.
ALTER TABLE range_sales RENAME PARTITION date_202001 TO date_202001_new;
Alternatively, rename the partition corresponding to '0' in the list partitioned table list_sales by specifying a partition value.
ALTER TABLE list_sales RENAME PARTITION FOR ('0') TO channel_new;