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
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;