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: Preferred method in creating primary key

Re: Preferred method in creating primary key

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Wed, 13 Aug 2003 23:04:22 +1000
Message-ID: <3f3a3b74$0$10354$afc38c87@news.optusnet.com.au>


"Thomas Kellerer" <spam_eater_at_gmx.net> wrote in message news:bhda05$119h6u$1_at_ID-13919.news.uni-berlin.de...
>
> I thought Oracle will create a unique index on the table anyway when I define a
> primary key...
>

Not all the options for CREATE INDEX
are in the Primay key clause. Not in 8i anyway.

Other "intangibles":
- you may want to use Norman's method so you can drop the constraint and keep the index. - you may want to allow duplicates to maintain or modify or patch some data, then reset the PK again. If you drop the constraint and keep the index, you can do it quickly and just re-enable the constraint once the data is "fixed". If you have the "constraint as the index", so to speak, you have to re-build the entire index when re-creating the constraint.

--
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Wed Aug 13 2003 - 08:04:22 CDT

Original text of this message

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