不可以
这样可以
select * from tabel a where money in (select max(money) from table) 

解决方案 »

  1.   

    select * from tabela a where not exists (select 1 from tablea where [money]>a.[money])
      

  2.   

    不可以
    select * from tabel  where money in (select max(money) from table)
      

  3.   

    可以告诉我,select * from tabel a where [money]>a.[money]
    这样为什么不行么
      

  4.   

    显然是不行的呀
    在a.money 是个不确定的值怎么比较呀
      

  5.   

    select * from tabela a where not exists (select 1 from tablea where [money]>a.[money])那这如何解释???
      

  6.   

    我认为你那样写,在语法上是没有问题的。
    但事实上是没有道理的。
    因为在一个表中,不可能某字段同自身比较的。没有意义,也不能出现结果。你想一想是不是这样。
    你想要找到某字段的最大值记录,可以向冰点写的那样做:
    select * from table  where money in (select max(money) from table) 
      

  7.   

    可以告诉我,select * from tabel a where [money]>a.[money]
    这样为什么不行么
    這樣做會選出所有大於a.[money]的所有[money]。即大於a.[money]中最小的就會選出來。
    select * from tabela a where not exists (select 1 from tablea where [money]>a.[money])那这如何解释???
    這個意思是當沒有一個[money]的值>a.[money]時選出記錄。即a.[money]為最大的時候。