SELECT * FROM 表名 WHERE 重复字段 IN (
SELECT 重复字段 FROM 表明 GROUP BY 重复字段 HAVING COUNT(1)>1
)
AND id NOT IN (
SELECT MIN(id) FROM 表名 GROUP BY 重复字段 HAVING COUNT(1)>1
)
;
SELECT * FROM 表名 WHERE 重复字段 IN (
SELECT 重复字段 FROM 表明 GROUP BY 重复字段 HAVING COUNT(1)>1
)
AND id NOT IN (
SELECT MIN(id) FROM 表名 GROUP BY 重复字段 HAVING COUNT(1)>1
)
;