Also,
NULL values are not stored in UNIQUE indexes on those columns,
as by definition "NULL is undefined". So, it does not make any
sense to store 2 or more undefined values, as by definition they
are "different". So you could have a column which is completely
NULL and has a UNIQUE constraint on it. The number of entires
on that index will be 0.
Cheers,
Gaja
- "Gogala, Mladen" <MGogala_at_oxhp.com> wrote:
> It's stored in the column because NULL != NULL. The only
> operators that
> can be applied to the NULL value are IS and IS NOT. Nothing
> else.
>
> -----Original Message-----
> Sent: Tuesday, October 10, 2000 7:26 AM
> To: Multiple recipients of list ORACLE-L
>
>
> Hi,
> I have a logical question, any one who can make it clear.
> create table a (x number(2) unique);
> insert into a values (null);
> 1 row created.
> insert into a values (null);
> 1 row created.
> Q:- I have a table 'A' have one field 'X' with unique
> constraint, so a
> unique index will be created for it. I inserted null into this
> field two
> times (or more then it).
>
> If null is a value, Why these null stored into table which
> have unique
> constraint?
> If null is not a VALUE then what it is?
> Is there some special character for NULL?
> If null is not a value why we have operators for null?
>
> Regards
>
> Muhammad Awais
> System Developer
> Paktel Ltd. Pakistan
> Mob. 0303 7757077
> (92-51) 111-222-111-282
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
> INET: awaisb_at_paktel.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858)
> 538-5051
> San Diego, California -- Public Internet access /
> Mailing Lists
>
> To REMOVE yourself from this mailing list, send an E-Mail
> message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru')
> and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).
> You may
> also send the HELP command for other information (like
> subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Gogala, Mladen
> INET: MGogala_at_oxhp.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858)
> 538-5051
> San Diego, California -- Public Internet access /
> Mailing Lists
>
> To REMOVE yourself from this mailing list, send an E-Mail
> message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru')
> and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).
> You may
> also send the HELP command for other information (like
subscribing).
Gaja Krishna Vaidyanatha
Director, Storage Management Products, Quest Software Inc.
Office : (972)-304-1170, E-mail : gajav_at_yahoo.com
Author - Oracle Tuning 101 by Osborne McGraw-Hill
"Opinions and views expressed are my own and not of Quest"
Received on Tue Oct 10 2000 - 15:09:29 CDT