Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: doubt on order of table scan

Re: doubt on order of table scan

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 16 Oct 2005 11:28:53 -0700
Message-ID: <1129487332.464262@yasure>


News wrote:
> "DA Morgan" <damorgan_at_psoug.org> wrote in message
> news:1129418334.65547_at_yasure...
>

>>>In Oracle NULL values are at end of result set
>>
>>SQL> SELECT * FROM t;
>>
>>       PID COL
>>---------- ---
>>         1 ABC
>>         2
>>         3 DEF

>
>
>
> May be I have badly expressed myself but this is what I meant. If there's no
> index so the data is scanned according to the order in which data are
> physically stored in blocks (page is sybase terminology equivalent to block
> so sorry). But assuming it's scan using an index on col
>
> SQL> SELECT * FROM t order by col;
>
> PID COL
> ---------- ---
> 1 ABC
> 3 DEF
> 2
>
> null values are at the end ;)

This is not a matter of using or not using an index. You are, again likely because you've not read the Oracle docs, making assumptions that are invalid.

You used the ORDER BY clause. Do you understand what it does? Do you understand how it works in Oracle? Apparently not. Once again I urge you to read the docs. Because again you are incorrect.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Sun Oct 16 2005 - 13:28:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US