Re: ... on update cascade ...
From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Tue, 25 Feb 2003 12:28:20 +0300
Message-ID: <b3fcvq$50e$1_at_babylon.agtel.net>
Date: Tue, 25 Feb 2003 12:28:20 +0300
Message-ID: <b3fcvq$50e$1_at_babylon.agtel.net>
[Quoted] Not sure it is a good idea to alter primary keys, but if you definitely
need to do it, try AFTER UPDATE FOR EACH ROW trigger and
DEFERRABLE foreign key constraint: defer the constraint check
(SET CONSTRAINT my_fk_cons DEFERRED)
update the PK, in the trigger update the child table, commit.
IIRC deferrable constraints are supported since version 8.
You may also want to read this:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:5773459616034
Corrections and additions welcome.
-- Vladimir Zakharychev (bob_at_dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "DeMi" <michal.demyda_at_wp.pl> wrote in message news:b3f95s$4tq$1_at_atlantis.news.tpi.pl...Received on Tue Feb 25 2003 - 10:28:20 CET
> Hi!
>
> I have a question. I have two connected tables. One of them is master and
> the other is slave. They are connected using foreign key. Is there any
> possibility, when I am changing content of one field in master table, to
> update these fields in slave table which are connected by a foreign key to
> that fiels in master table. I know that exist a clause "... ON DELETE
> CASCADE" for deleting master fields, but I couldn't find "... ON UPDATE
> CASCADE". How to do sucha thing by hand?
>
> Best regards
> Michal Demyda
>
>
>
>