select ROWNUM , t.* from emp t where ROWNUM <=5;
select t.* from emp t where ROWNUM <=5;
说明: 1. ROWNUM 为一个独立的字段,不能加表的别名修饰(即:t.ROWNUM是错误的); 2. 可以对分页数据进行二次封装(如下) select * from ( select ROWNUM as n,t.* from emp t ) where n<=5;