select max(t.score) from table t where t.evalId=1

解决方案 »

  1.   

    SQL语句可以直接取最大的
    SELECT max(t.score) FROM table t;
      

  2.   

    楼主应该是想取出分数最高的那个人的信息吧?要不然直接用max就可以了
    :select * from t where t.score =(select max(t.score) from table t where t.evalId=1)
      

  3.   

    select max(t.score) from table t where t.evalId=1 
      

  4.   

    楼上正解,sql里有很多这样的函数
    sum:求和
    max:最大
    min:最小
    等等