Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with unique constraint creation
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