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: Unique constraint and NULL values

Re: Unique constraint and NULL values

From: Dave <slimdave_at_yahoo.com>
Date: 22 Oct 2004 12:23:06 -0700
Message-ID: <c502cdfc.0410221123.4e07df91@posting.google.com>


If you want to get around this, then use a function-based index to avoid including in a unique index any rows where either of the columns is null.

One method would be ...
[code]

Create unique index my_ind
on my_tab (Decode(col2,Null,Null,col1),Decode(col1,Null,Null,col2))
[/code]
Received on Fri Oct 22 2004 - 14:23:06 CDT

Original text of this message

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