Mysql删除重复记录

Mysql删除重复记录

DELETE FROM posts WHERE id IN (
    SELECT * FROM (
        SELECT id FROM posts GROUP BY id HAVING ( COUNT(id) > 1 )
    ) AS p
)
生活不止苟且,还有我喜爱的海岸.