Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select First 500 Rows of a Table
Michael wrote:
> Hello all,
>
> Thanks for responding.
>
> It seems Oracle keeps track of records\rows internally using ROWNUM.
> So for all those in a simliar situation try something like this:
>
> SELECT * FROM mytable WHERE rownum <= 500
>
>
> -Michael
You are incorrect. Oracle does not keep track of row numbering internally and there is no such thing as ROWNUM. ROWNUM is assigned during a query and is wholly dependent upon the ordering created by the query.
If you think I'm wrong then by all means try this:
SELECT *
FROM all_objects
WHERE ROWNUM = 2;
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Wed Aug 18 2004 - 10:15:30 CDT