Following SQL query will help you to get number of records in between certain range using ROWNUM.
SELECT *
FROM
(SELECT a.*, ROWNUM rnum
FROM
(SELECT *
FROM employees
ORDER BY employee_id, rowid) a
WHERE ROWNUM <= 10
)
WHERE rnum >= 8;
You can find more details in following LINK
No comments:
Post a Comment
Provide your thoughts !