rownum greater than query
XenofonApr 14 2010 — edited Apr 14 2010Hi all,
first of all, what I am aware about...
I am aware about the fact, that ROWNUM filters, inside the query which is to be filtered by rownum, are incorrect. That is this is incorrect:
select * from <table> where rownum < 20;
Also I am aware, that the following will never return a result:
select * from <table> where rownum > 20;
That is clear. The correct version of the "less than" query is:
select * from (select * from <table> order by a) where rownum < 20;
Now the question: what does the last example still not work with "greater than" queries:
Take e.g. following example:
select * from (
select * from dba_objects order by object_name
) where rownum > 5
;