Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to drop a foreign key
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;