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: Test if Data for a Field is UNIQUE

Re: Test if Data for a Field is UNIQUE

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 23 Jan 2006 20:29:48 -0500
Message-ID: <ocCdneAYae2SHkjenZ2dnUVZ_t-dnZ2d@comcast.com>

"Mladen Gogala" <gogala_at_sbcglobal.net> wrote in message news:pan.2006.01.23.18.40.17.296539_at_sbcglobal.net...
> On Mon, 23 Jan 2006 05:32:02 -0800, Michael42 wrote:
>
> You can have a unique constraint on the column even the values in the
> column are not unique.
>
> --

are you sure you meant that?

this is possible, but only under the following conditions:

  1. constraint is not enabled or
  2. constraint is enabled novalidate, and an non-unique index on the PK columns already exist prior to enabling the constraint (then the data existing prior to enabling the constraint may containt duplicates, but all inserts and updates will be validated against the constraint)

interestingly, under scenario 2, FK validation still proceeds normally even if duplicate PK values exist

++ mcs Received on Mon Jan 23 2006 - 19:29:48 CST

Original text of this message

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