ORACLE中ROWNUM的说明
在Oracle中,要按照特定条件查询前N条记录,可以用rownum就搞定了 select * from emp where rownum <= 5; 但是不能对rownum使用>,也就是说以下的查询语句是无效的: select * from emp where rownum > 5; 但是这条语句为什么不能够使用呢?这雨rownum背后的机制有关系: 1、Oracle executes your query 2、Oracle fetches the first row and calls it now number 1 3、Have we gotten past row number meets the criteria? If no, then Oracle discards the row, if yes, then oracle return the row 4、Oracle fetches the