Updated on 2024-06-07 GMT+08:00

Adding a Level-2 Partition to a Level-2 Partitioned Table

You can use ALTER TABLE MODIFY PARTITION ADD SUBPARTITION to add a level-2 range or list partition to a level-2 partitioned table.

For example, add a level-2 partition named date_202004 to the level-2 partitioned table range_list_sales.
ALTER TABLE range_list_sales MODIFY PARTITION date_202004 ADD SUBPARTITION date_202004_channel5 VALUES ('X') TABLESPACE tb2;

If the level-2 partitioning policy of a level-2 partitioned table is HASH, the level-2 partition cannot be added using ALTER TABLE MODIFY PARTITION ADD SUBPARTITION.