Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PUBLIC:Re: Top 10
>Try:
>
>Select *
>from xyz
>where rownum <= 10
>
>and you get the first 10 rows of the select result
>
>
This comes up at least once a month!
Sure, it works if you don't include
an ORDER BY.
If you do then you get the first 10 records
that would have been retrieved BEFORE
the ORDER BY is applied. which is probably
not what you want.
John
FOR UTILITY PARTNERS EMPLOYMENT
OPPORTUNITIES VISIT www.utilpart.com
e-mail: jomarlen_at_aol.com
Web Site: http://members.aol.com/jomarlen/
The views expressed in this message
are those of the author and not
necessarily those of U.P. Inc.
and/or its employees.