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_at_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 - 21:23:06 CEST

Original text of this message