searock
12/9/2015 - 7:38 PM

Oracle pagination query

Oracle pagination query

SELECT *
FROM (SELECT R.*, ROWNUM RNUM, COUNT(*) OVER () RESULT_COUNT 
      FROM (SELECT i.ITEM_CODE, i.ITEM_NAME
            FROM TBL_ITEMS i) R)
WHERE RNUM between 0 and 9 ;