DELETE
FROM
people
WHERE
peopleId IN (SELECT peopleId FROM people GROUP BY peopleId HAVING count(peopleId) > 1)
AND rowid NOT IN (SELECT min(rowid) FROM people GROUP BY peopleId HAVING count(peopleId) > 1)

posted on 2018-03-08 17:31  花开浪漫拾  阅读(2591)  评论(0编辑  收藏  举报