MySQL删除重复数据 伪造一些重复的假数据: 1. 查询出所有的重复数据的数量的最小id号 SELECT id FROM ( SELECT min( id ) id FROM test GROUP BY a 2.删除非最小id的其他数据 DELETE FROM test WHERE id NOT IN ( SELECT id FROM ( SELECT min( id ) id FROM test GROUP BY a ) t ) 得到的结果是: