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: Sat, 15 Oct 2005 16:18:50 -0700
Message-ID: <1129418334.65547@yasure>


News wrote:
> "IANAL_VISTA" <IANAL_Vista_at_hotmail.com> wrote in message
>

>>What happens if the index is on a NULLable column?

>
>
> In Oracle NULL values are at end of result set

Not true.

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Oct 15 16:17:24 2005

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining options

SQL> create table t (

   2 pid NUMBER(2),
   3 col VARCHAR2(3));

Table created.

SQL> INSERT INTO t VALUES (1, 'ABC');

1 row created.

SQL> INSERT INTO t VALUES (2, NULL);

1 row created.

SQL> INSERT INTO t VALUES (3, 'DEF');

1 row created.

SQL> COMMIT; Commit complete.

SQL> SELECT * FROM t;

        PID COL
---------- ---

          1 ABC
          2
          3 DEF

SQL>

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Sat Oct 15 2005 - 18:18:50 CDT

Original text of this message

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