Oracle 删除重复行

solution 1

create table newtable as select distinct * from oldtable;

drop table oldtable;

rename table newtable to oldtable;

 

solution 2

create table newtable as select distinct * from oldtable;

truncate table oldtable;

alter table oldtable disable all triggers;

insert into oldtable select * from newtable;

commit;

alter table oldtable enable all triggers;

 

solution 3

delete from table a where a.rowid<(select max(rowid) from table b where a.id= b.id);

posted @ 2016-03-27 17:45  全威儒  阅读(788)  评论(0编辑  收藏  举报