SELECT * FROM (SELECT ENAME,SAL,ROWNUM RN FROM EMP WHERE ROWNUM <= @CURRENTPAGE*@PAGESIZE) SUB WHERE SUB.RN > (@CURRENTPAGE-1)*5;