Re: updating primary key

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/10/13
Message-ID: <344589f2.29353107_at_newshost>#1/1


On 13 Oct 1997 19:30:32 GMT, "Debbie Nein" <neind_at_ci.portsmouth.va.us> wrote:

> Please help with the following problem:
>
> I have 2 tables A & B. Table B has a foreign key to Table A
>(master/detail). I need to update a column that is part of the primary key
>in Table A, and I would like this to automatically update the foreign key
>in Table B. (like an update cascade, if it were possible)
>
>I tried to create row and statement database triggers using a package, but
>I got a mutating trigger.
>
>Also, I will need to automatically query with the new values.
>
>Any help will be greatly appreciated.

A package to generate the needed triggers and pl/sql package to do an update cascade exists at http://govt.us.oracle.com/ under the download utilities quick pick link. Once you get past the disclaimer, look for update cascade.

What it does, how it does it, and what the limits are -- are listed on the web page and all the code is there for download.

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Oct 13 1997 - 00:00:00 CEST

Original text of this message