Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re: order of rows when selecting from table of
they guarantee it, but its not really accurate for full table scans. if you:
Then the ordering should stay the same. I was on a project once where we had security IDs for various items. These ideas were not logical so you couldn't order on anything. The lead did not want to use a counter, so they just relied on selecting the following:
select id
from id_table
where rownum < 5
etc... worked ok for what they were doing. Though it was a pretty stupid idea.
>
> From: david wendelken <davewendelken_at_earthlink.net>
> Date: 2004/04/16 Fri AM 08:44:04 EDT
> To: oracle-l_at_freelists.org
> Subject: Re: order of rows when selecting from table of
>
> Subject: Re: order of rows when selecting from table of
>
> >Oracle being a wonderful and concerned corporation will only guarantee
> >that you will get the data out of the table when the select and other
> >clauses are correct.
>
> When I took my first Oracle SQL class back in the 80's, Oracle guaranteed that the order of the returned data (without an order by clause) was "indeterminate", meaning that they guaranteed that you could not count on any order from query to query.
>
> So, use the order by clause if you want a specific order!
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Fri Apr 16 2004 - 08:10:36 CDT