select * from table1 A
where [time] = (select max([time]) from table1 where [name] = A.name)

解决方案 »

  1.   

    select name, max([time]) as time from table
    group by name
      

  2.   

    select * from table a
    where time=(select max(time) from table where name=a.name)
      

  3.   

    select * from table a
    where time=(select max(time) from table where name=a.name)
      

  4.   

    select * from yourtable as ta where not exists(select 1 from yourtable where ta.[time]<[time] and ta.[name]=[name])
      

  5.   

    select * from tablename a where time in (select max(time) from tablename where name=a.name)
      

  6.   

    select * from 你的表 tem where [TIME]=(select max([TIME]) from 你的表 where [name]=tem.[name])
      

  7.   

    select * from tablename a where not exists (select 1 from tablename b where b.name=a.name and a.time<b.time)
      

  8.   

    select * from tablename a where not exists (select 1 from tablename b where b.name=a.name and a.time<b.time)
      

  9.   

    select name,max(time) from table
    group by name