删除表中多余的重复记录,重复记录是根据单个字段(Id)来判断,只留有rowid最小的记录

delete from Resource where Title in (select Title from Resource group by Title having count(Title) > 1) and   Id not in (select min(Id) from Resource group by Title having count(Title)>1)

posted @ 2019-03-15 15:10  大冉啊  阅读(350)  评论(0编辑  收藏  举报