Best practice for pagination in Oracle?

前端 未结 7 1403
别那么骄傲
别那么骄傲 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

    Sorry, this one works with sorting:

    SELECT * FROM (SELECT ROWNUM rnum,a.* FROM (SELECT * FROM "tabla" order by "column" asc) a) WHERE rnum BETWEEN "firstrange" AND "lastrange";
    

提交回复
热议问题