Oracle 里怎么实现分页?请详细的说一下代码?
发布网友
发布时间:2022-04-23 15:26
我来回答
共2个回答
热心网友
时间:2022-05-01 09:44
SELECT * FROM (SELECT A.*, ROWNUM RN FROM (SELECT * FROM TABLE_NAME) A
WHERE ROWNUM <= pageNum*pageSize) WHERE RN >(pageNum-1)*pageSize
热心网友
时间:2022-05-01 11:02
比如说,每页显示3条记录,获得第3页学生记录,按学号排序。
SELECT * FROM
(
SELECT A.*, ROWNUM RN
FROM (SELECT * FROM TABLE_NAME order by 学号) A
WHERE ROWNUM <=9
)