Delphi数据库中如何判断某一列中最大值并返回该行呀~~~

解决方案 »

  1.   

    用SQL做查询的话:select top 1 * from 表名 order by 在判断的字段 Desc
                                                   ~~~~~具体用正排序还是倒排序我忘记了
      

  2.   

    Select * From Table A Where Not Exists (Select * From Table Where Field > A.Field)
      

  3.   

    select top 1 * from 表名 order by 在判断的字段 Desc----------------------------------这个只能是显示一条含最大值的记录, 如果有多条含最大值的记录,这样做就不灵光了。呵呵。
      

  4.   

    用select Max(字段名) from ...
    不可以吗