批量移动分区表到其他表空间

移动smsg_logs 表的全部分区到PRODUCT表空间:
 
begin
for x in(select partition_name from dba_tab_partitions where table_name='SMSG_LOGS')
loop
execute immediate 'alter table smsg_logs move partition ' || x.partition_name || ' tablespace users';
end loop;
end;
/
请使用浏览器的分享功能分享到微信等