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: PK vs Unique index

Re: PK vs Unique index

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 17 Jan 2002 19:06:07 +0000
Message-ID: <3C47209F.FB7@yahoo.com>


Dirk Gomez wrote:
>
> <non-unique primary key indexes>
>
> Can you give me a "real-life" example where that can be useful?

Whenever you need to update a primary key...Yes, I know that we are never meant to update them, but it does happen from time to time..

Also, when adding primary keys to existing data you can

a) create non-unique index
b) add PK and catch the exceptions
c) delete the exceptions
d) alter the PK to enabled novalidate

Magic...

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Thu Jan 17 2002 - 13:06:07 CST

Original text of this message

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