| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any way to do "unique or null"?
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)
![]() |
![]() |