Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to delete a primary key constraint?

Re: how to delete a primary key constraint?

From: Ulrich F. Zeh <zeh_at_regware.de>
Date: Mon, 21 Dec 1998 07:25:12 +0100
Message-ID: <367DE9C8.8BD496C9@regware.de>


don't forget to drop any foreign key referencing your ID_COLUMN. Otherwise, you won't get rid of your PK.

skv wrote:

> Martin Hilpert пишет в сообщении <367D48CB.7FE0147A_at_framesoft.com> ...
> >Can somebody tell me the syntax of how to delete a primary key
> >constraint?
> >I tried
> > delete from MYTABLE constraint
> >but this raises some other constraint errors that I don't want to
> >remove.
> >I just want to remove the primary key constraint of ID_COLUMN of
> >MYTABLE.
>
> ALTER TABLE mytable DROP PRIMARY KEY;
> or
> ALTER TABLE mytable DROP CONSTRAINT constraint_name;
>
> Regards
> ------------------------------------
> Konstantin V. Sartakov
> Kuzbassprombank
> Kemerovo
> Russia
> mailto:skv_at_kpbank.ru
Received on Mon Dec 21 1998 - 00:25:12 CST

Original text of this message

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