删除表中多余的重复记录,重复记录是根据单个字段来判断,只留有id最小的记录
DELETE FROM [表名] WHERE `id` NOT IN( SELECT t.max_id FROM ( SELECT MIN(`id`) AS max_id FROM [表名] GROUP BY [重复字段] ) AS t )
删除表中多余的重复记录,重复记录是根据单个字段来判断,只留有id最小的记录
DELETE FROM [表名] WHERE `id` NOT IN( SELECT t.max_id FROM ( SELECT MIN(`id`) AS max_id FROM [表名] GROUP BY [重复字段] ) AS t )