Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How enforce on update cascade ?
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