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 drop Foreign key?

Re: How to drop Foreign key?

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Sat, 13 Nov 1999 21:05:40 +0100
Message-ID: <942523600.2498.0.pluto.d4ee154e@news.demon.nl>


alter table drop constraint <constraint_name>

Primary key is an obvious exception.
If you don't know the name of your constraint select constraint_name
from user_constraints
where constraint_type = 'R'

Hth,

--
Sybrand Bakker, Oracle DBA
Jingyan <jingyan.xu_at_tst2000.com> wrote in message news:SCiX3.647$LK3.24476_at_nuq-read.news.verio.net...
> Hi,
> I use following SQL to drop primary key of T1:
> ALTER TABLE T1
> DROP PRIMARY KEY;
>
> But, I use following SQL to drop Foreign key of T1 and I got a error:
> ALTER TABLE T1
> DROP FOREIGN KEY REFERENCES T2;
>
> Would you like to tell me how to drop it.
> Thanks in advance
> Jingyan Xu
>
>
>
>
Received on Sat Nov 13 1999 - 14:05:40 CST

Original text of this message

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