select *
from Ta a
where not exists(select 1 from ta where a.name = name and id > a.id)

解决方案 »

  1.   

    select id,name,min(other1)
    from yourTable
    group by id,name
    == 思想重于技巧 ==
      

  2.   

    另解SELECT * FROM ta
    WHERE id IN(SELECT MAX(id) FROM ta GROUP BY name)
      

  3.   

    SELECT * FROM ta
    WHERE id IN(SELECT min(id) FROM ta GROUP BY name)
      

  4.   

    谢谢各位,太有才了。select *
    from Ta a
    where not exists(select 1 from ta where a.name = name and id > a.id)
    应用