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: How to drop a foreign key

Re: How to drop a foreign key

From: <xmark.powell_at_eds.com.x>
Date: 11 Apr 2001 13:10:25 GMT
Message-ID: <9b1l41$2m5$1@news.netmar.com>

In article <3AD3D84A.27B789E1_at_ust.hk>, David YEUNG <dyeung_at_ust.hk> writes:
>I have a table A which contains a foreign key reference to
>table B's primary key, e.g.:
>
>create table A (
> ...
> fid varchar2(16) not null,
> ...
> foreign key (fid) references B(pid) on delete cascade
>)
>
>where pid is the primary key of the table B.
>
>Can someone tell me how to drop (or disable) the foreign key in table A.
>
>Thanks
>
>david

Look at dictionary view all_constraints and get the constraint name then use the alter table command:

alter table a drop constraint constraint_name;

Received on Wed Apr 11 2001 - 08:10:25 CDT

Original text of this message

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