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

Home -> Community -> Usenet -> c.d.o.server -> Re: Any way to do "unique or null"?

Re: Any way to do "unique or null"?

From: Jurij Modic <jmodic_at_src.si>
Date: Tue, 15 Sep 1998 06:41:57 GMT
Message-ID: <35fe09e0.1076718@news.siol.net>


On Mon, 14 Sep 1998 18:13:37 GMT, nasof_at_hotmail.com wrote:

>Oracle allows you to have multiple nulls in a SINGLE unique column
>"constraint". But composite unique keys (which create a unique indexs) can
>only have one occurance of all nulls. Make sense? not really...

Not true. In Oracle's composite unique keys you can have as many records with all unique-key columns having nulls as you want - the constraint will not be violated.

But if you have a record with one of the key columns set to non-null value and other key columns with nulls, you can't have another record with the same non-null value in the same key column and other key columns with nulls - in this case the constraint will be violated.

>-Frank

Regards,
--
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Tue Sep 15 1998 - 01:41:57 CDT

Original text of this message

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