We can use SELECT * FROM tab WHERE rownum<=N ORDER BY to get the top n rows.
How can I get the rows from M to N, that is, skip M rows then get top N?
We can not use condition like rownum>=M as it is always FALSE.
Thanks for any help.
Printable View
We can use SELECT * FROM tab WHERE rownum<=N ORDER BY to get the top n rows.
How can I get the rows from M to N, that is, skip M rows then get top N?
We can not use condition like rownum>=M as it is always FALSE.
Thanks for any help.
This topic has been discussed many times before. Use http://www.dbasupport.com/forums/search.php and search for windowing. chrisrlong has a neat windowing technique that he patiently explains each time someone asks this question.