a      b
--------
a1     2
b2     3
c3     1取b字段最小值的记录

解决方案 »

  1.   

    select min(b) from table
      

  2.   

    select a from tbname where b=(select min(b) from tbname);
      

  3.   

    select a from (
    select a,rank() over(order by b desc) rk
    ) t where rk=1;
      

  4.   

    select distinct first_value(a) over(order by b),b from t
      

  5.   

    在多条记录中在b字段的值会现重复一样的值但又是最小值。如
    b         b
    --       ---
    3         2
    3         1
    2         1
      

  6.   

    bzszp(SongZip)在前面写的那个不是很好吗?你需要什么样的呢?