此篇不定时更新不成系统,为随笔;
– Move partition from table_name_1 to table_name_2
ALTER TABLE table_name_2 EXCHANGE PARTITION (partition_spec) WITH TABLE table_name_1;
– multiple partitions
ALTER TABLE table_name_2 EXCHANGE PARTITION (partition_spec, partition_spec2, …) WITH TABLE table_name_1;
给该语句允许您将分区中的数据从一个表移动到另一个具有相同模式但还没有该分区的表。