Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to delete a primary key constraint?
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