Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Preferred method in creating primary key
On Wed, 13 Aug 2003 23:05:18 +0800, Connor McDonald wrote:
> Jack Wang wrote:
> > In v9 you can have your cake and eat it too with the KEEP INDEX clause > on constraints should you wish to disable/enable them >
Depends how hungry you are. Try disabling a primary key constraint thatīs using a unique index, and then specifying the keep clause. Works lovely. Now try entering a duplicate record... it will still get spat out. So how effective was your īdisableī request in the first place?? Er, not very.
Whatever the new syntactical possibilities, it still makes absolutely no logical sense to disable a unique constraint and leave behind an index that demands uniqueness. (The other way around, where you disable the constraint AND would like to drop the non-unique index that was enforcing it in one simple step is a much more sensible use of this new feature).
My own view is that Oracle should never have permitted īKEEPī when the index concerned was a unique one, since itīs a logical nonsense.
Regards
HJR
Received on Wed Aug 13 2003 - 15:21:15 CDT
![]() |
![]() |