select * from tbl where [b]rownum <=[/b] <some number>;
...but due to the nature of the ROWNUM expression, you cannot make comparisons (using the above syntax) with the ">" comparison operator and achieve the results you want. So, in summary, always use "<" or "<=" for your ROWNUM comparison operator.
(There are tricks to use "=", ">=", and ">" with ROWNUM, but that is a topic we'll address if you ask for it.)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.