用户:SC ;普通表:T ;分区表:T_NEW
--execute dbms_redefinition.abort_redef_table('SC','T','T_NEW');
execute dbms_redefinition.start_redef_table('SC','T','T_NEW');
execute dbms_redefinition.sync_interim_table('SC','T','T_NEW');
execute dbms_redefinition.finish_redef_table('SC','T','T_NEW');
注:先删除表T,否则重建索引可能重名,表T_NEW索引需要重建
删除表中多余的重复记录(多个字段),只留有rowid最小的记录
delete from 表 a where (a.Id,a.seq) in (select Id,seq from 表 group by Id,seq having count(*) > 1) and rowid not in (select min(rowid) from 表 group by Id,seq having count(*)>1)