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: Drop constraints CASCADE not working on 10g Express

Re: Drop constraints CASCADE not working on 10g Express

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Fri, 24 Nov 2006 16:16:47 +0100
Message-ID: <45670d5e$0$18849$9b4e6d93@newsspool4.arcor-online.net>


QDL schrieb:
> Hello everyone,
>
> I have a problem with a table which has a primary key. I want to delete this
> primary key in order to be able to create a different one. In Oracle 9i I
> used to issue:
>
> ALTER TABLE xxx DROP CONSTRAINT "PK_XXX" CASCADE;
>
> and I deleted BOTH the constraint AND the primary key.
>
> If i issue that command on my Oracle 10g Express, the constraint is deleted
> but PK_XXX is still there preventing me to create a new one with the same
> name...
>
> Is this a problem with 10g Express, something has changed in the way CASCADE
> works?
>
> Thanx in Advance
> Paolo
>
>

Paolo, CASCADE keyword is/was not related to the index retaining/dropping of primary key. To drop/retain index you have to specify DROP INDEX or KEEP INDEX, you can look it up http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2103845 I believe, it was discussed here some time ago about changed behaviour from 9i to 10g (in 9i default was DROP INDEX, in 10g - the opposite iirc).

Best regards

Maxim Received on Fri Nov 24 2006 - 09:16:47 CST

Original text of this message

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