SELECT *
FROM (
SELECT q.*, rownum rn
FROM (
SELECT *
FROM maps006
ORDER BY
id
) q
)
WHERE rn BETWEEN 50 AND 100
Note the double nested view. ROWNUM
is evaluated before ORDER BY
, so it is required for correct numbering.
If you omit ORDER BY
clause, you won't get consistent order.