Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: unique constraint and nulls
>>Is this possible with a constraint? Or do I have to use a trigger?
Strange design aside, you could get it working with a function based (unique) index, but NOT RECOMMENDED.
CREATE UNIQUE INDEX MY_UNIQUE_INDEX ON
THE_TABLE(DECODE(COL1,NULL,NULL,COL1||COL2))
HTH
Carlos.
Received on Fri May 26 2006 - 04:36:54 CDT