咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
语法:
DELETE FROM 表名
WHERE id NOT IN (
SELECT temp.min_id FROM (
SELECT MIN(id) min_id FROM 表名
GROUP BY 字段名
)AS temp
);
备注:id:也是表字段
实例:
DELETE FROM pro_completed_table
WHERE id NOT IN (
SELECT temp.min_id FROM (
SELECT MIN(id) min_id FROM pro_completed_table
GROUP BY md5
)AS temp
);