select * from 表 a
where not exists(select * from 表 where a=a.a and c>a.c)

解决方案 »

  1.   

    zjcxc(邹建):
    select * from 表 where a=a.a and c>a.c 这句是什么意思啊!!
    好象经常有这种的问题!!
      

  2.   

    select * from tab a
    where c in(select top 1 c from tab where a=a.a order by c desc)
    order by a asc
      

  3.   

    select * from 表 where a=a.a and c>a.c 
    是查找是否有比当前记录C值大且A相同的记录
      

  4.   

    select A.* from 表tab as A,(select a,max(c) as c from 表tab group by a) as B  where A.a=B.a and A.c=B.c
      

  5.   

    如果你不喜欢用邹大哥那种写法你就可以用MAX,是一样的效果!!