1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断
代码如下:
select * from content
where 标题 in (select 标题 from content group by 标题 having count
(标题) > 1)
2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录
代码如下:
delete from content
where 标题 in (select 标题 from people group by 标题 having count
(标题) > 1)
and rowid not in (select min(rowid) from content group by 标题 having count(标题
)>1)
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。