方法一:

delete from dbyh where yhbh in(select yhbh from dbyh group by yhbh having count(*)>1) and
rowid not in (select min(rowid) from dbyh group by yhbh having count(*)>1);

 

方法二:

create table dbyh_tmp as select distinct * from dbyh;

drop table dbyh;

alter table dbyh_tmp rename to dbyh;

 

posted on 2017-06-26 09:20  为了八千块  阅读(375)  评论(0编辑  收藏  举报