select count(1) from table where age between 20 and 25

解决方案 »

  1.   


    select count(age) from table where age between 20 and 25
      

  2.   

    select count(*) from table where age between 20 and 25
    其实和lwk_hlj(阿凯(学习oralce中)) 的一样
      

  3.   

    我最近发现count(*) 和 count(1),count('1')之类,  性能上是一样的~
    想想oracle也没那么笨, count(*)会去找行的全部内容.比较之下, count(*)有较高的可读性