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
原文:http://www.cnblogs.com/quanweiru/p/5326306.html