Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Preferred method in creating primary key
"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.nospamReceived on Wed Aug 13 2003 - 08:04:22 CDT