Best practice for pagination in Oracle?

前端 未结 7 1389
别那么骄傲
别那么骄傲 2020-11-28 07:22

Problem: I need write stored procedure(s) that will return result set of a single page of rows and the number of total rows.

Solution A: I create tw

7条回答
  •  攒了一身酷
    2020-11-28 08:15

    This may help:

       SELECT * FROM 
         ( SELECT deptno, ename, sal, ROW_NUMBER() OVER (ORDER BY ename) Row_Num FROM emp)
         WHERE Row_Num BETWEEN 5 and 10;
    

提交回复
热议问题