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 enforce on update cascade ?

Re: How enforce on update cascade ?

From: Dag Arne Matre <dam_at_visma.no>
Date: Mon, 22 Jun 1998 11:37:15 +0200
Message-ID: <358E25CB.E3CA7BB0@visma.no>


alter table <table>

    drop constraint <fk>

alter table <table>

    add constraint <fk> foreign key (<col>)

       references <table> (<col>) on update cascade on delete cascade

Jarek Palka wrote:

> I've two tables : table A with primary key and table B with foreign key
> referencing to primary key in table A. How can I update primary key in table
> A without disabling referential integrity constraints in table B ? I'd like
> to do such action: when there is update on table A all child records are
> automatically updated, too. There is no possibility to do this on triggers
> without disabling referential integrity. Updating table A cause an error :
> child record found, updating table B cause an error : parent key not found.
> We've Oracle server ver. 7.3.2
>
> Jarek Palka, P.I.Kamsoft
> Katowice, Poland
Received on Mon Jun 22 1998 - 04:37:15 CDT

Original text of this message

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