1.根据名称分组去重,并查询记录ID select max(id) from T_TABLE GROUP BY name 2.根据ID获取记录 select * from T_TABLE where ID in ( select max(id) from T_TABLE GROUP BY name ) 来源:https://www.cnblogs.com/Bud-blog/p/11882925.html 标签 mysql去重 select mysql table