------解决方案-------------------- delete a from tt a inner join tt b on a.name=b.name and a.score=b.score and a.id>b.id
------解决方案-------------------- 如果非要一条sql删除
delete from tb where id in( select min(id) as id from tb group by name,score);
不过效率很低
------解决方案-------------------- or SELECT a.`name`,a.`score`,MIN(a.`id`) FROM ttp4 a GROUP BY a.`name`,a.`score`
------解决方案--------------------
这是自连接查询,自行修改一下,在我SQL语句中,A、B为TT表的别名 delete a1 from a a1 inner join a b1 on a1.name=b1.name and a1.score=b1.score and a1.id>b1.id
------解决方案-------------------- OR