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: Problem with unique constraint creation

Re: Problem with unique constraint creation

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Fri, 12 Jul 2002 21:43:33 +1000
Message-ID: <YazX8.33529$Hj3.100741@newsfeeds.bigpond.com>


Hi EP

When you create a constraint that you wish to enable novalidate, it must be *deferrable* (but can be set deferrable initially immediate which is the default).

Change your statement to something like:

alter table x add (constraint x_col_unique (col) deferrable enable novalidate);

Should now work for you.

Good Luck

Richard
"EP" <ep_at_plusnet.pl> wrote in message news:agmd9t$e7i$1_at_news2.tpi.pl...
> Hi
>
> I've encountered the following problem: I try to create a unique
constraint
> on the table in which several rows are duplicated with option enable
> novalidate (don't check the existing rows but enable the constraint for
the
> new ones). When I execute the statement I got the ORA-2299 error - cannot
> validate (XXXX.YYYY) - duplicate keys found.
> What is the problem ?
>
> TIA
> EP
>
>
Received on Fri Jul 12 2002 - 06:43:33 CDT

Original text of this message

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