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 nulls

Re: unique constraint and nulls

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 26 May 2006 02:36:54 -0700
Message-ID: <1148636214.326604.97390@i40g2000cwc.googlegroups.com>


>>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

Original text of this message

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