1.Oracle分页查询:
SELECT * FROM
( SELECT A.*, ROWNUM rn FROM (SELECT * FROM tableName) A WHERE ROWNUM <= 10 )
WHERE rn >= 1;
这个分页比下面的执行时间少,效率高。
2.select * from
(select B.*,rownum rn from core_user B)
where rn between 1 and 10
SELECT * FROM
( SELECT A.*, ROWNUM rn FROM (SELECT * FROM tableName) A WHERE ROWNUM <= 10 )
WHERE rn >= 1;
这个分页比下面的执行时间少,效率高。
2.select * from
(select B.*,rownum rn from core_user B)
where rn between 1 and 10