意思如下:
select account(*) where 成绩 < '成绩'

解决方案 »

  1.   

    select count(*) as gradeindex from yourtalbe where 成绩 >= "实际成绩";
      

  2.   

    select distinct count(*) from tabname where grade <= '成績'  -- 棄除相同成績,有並列名次的情形.select count(*) from tabname where grade <= '成績'  -- 不棄除相同的成績
      

  3.   

    这样是不是要对比我表里的所有记录?有没有必要把成绩字段建立索引?count(*)如果改成 count(id)会不会增加效率?
      

  4.   

    count(*)会自动选择索引.
    所以没有必要改成count(id)
    有时候改为count(filedName)倒还不能使用索引.成绩字段最好建立索引.
    DennisLan(Dennis)的select distinct count(*) from tabname where grade <= '成績'
    有问题. 
    应该是select count(distinct grade) from tabname where grade <= '成績'。