只需一条简单sql语句
DELETE FROM ceshi WHERE id NOT IN (SELECT id from ( SELECT min(id) AS id FROM ceshi GROUP BY `name`,class)a)
只需一条简单sql语句
DELETE FROM ceshi WHERE id NOT IN (SELECT id from ( SELECT min(id) AS id FROM ceshi GROUP BY `name`,class)a)
评论 (0)