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: Very strange... PK enabled with null values in it!

Re: Very strange... PK enabled with null values in it!

From: Erwin Dondorp <erwindon_at_wxs.nl>
Date: Wed, 08 Dec 1999 18:59:33 +0100
Message-ID: <384E9C85.76EFE125@wxs.nl>


aquabubble wrote:
> I was wondering if anyone else had seen this kind of thing before. This
> should be impossible, so how can I have a primary key enabled with null
> values in its column?
>
> Also, we've just seen another table with a composite primary key with
> null values in its second column.
>
> In both of these cases, the pk is enabled and the index is valid
> (whatever use that info is).

In some versions of Oracle this effect can/could be reached by adding the primary
key after the record were already present. ALTER TABLE ... ADD PRIMARY KEY
did check for duplicate records during the index building but the NOT NULL constraint
that was also added was never checked.

--
Erwin Dondorp
<http://www.dondorp.com/> Received on Wed Dec 08 1999 - 11:59:33 CST

Original text of this message

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