DELETE FROM huizong_haodaifu WHERE
id IN (
SELECT id FROM (
SELECT id,COUNT(*) FROM huizong_haodaifu
GROUP BY id
HAVING COUNT(*) > 1
) AS a
)
DELETE FROM huizong_haodaifu WHERE
id IN (
SELECT id FROM (
SELECT id,COUNT(*) FROM huizong_haodaifu
GROUP BY id
HAVING COUNT(*) > 1
) AS a
)
转载于:https://www.cnblogs.com/542684416-qq/p/11583394.html