Re: Exists foreign key "on update cascade"

From: <sybrandb_at_hccnet.nl>
Date: Mon, 25 Feb 2008 22:41:46 +0100
Message-ID: <4ed6s35bmf0r7dlrap1dmirllve12k963t@4ax.com>


On Mon, 25 Feb 2008 15:50:26 +0100, Norbert Winkler <Norbert.Winkler1_at_gmx.de> wrote:

>Hi,
>
>google says no, and my SQL-reference I have doesn't mention it.
>Thats why the question:
>
>In other DBs it is possible to define a foreign key with
>"ON UPDATE CASCADE"
>what means: I change a (primary-)key-value in the master-table and all
>foreign-key-values in detail-tables are changed accordingly.
>Is there any oracle-version that does it.
>I only found:
>ON DELETE/UPDATE NO ACTION, ON DELETE CASCADE und ON DELETE SET NULL

There is not.
However on http://asktom.oracle.com you will find a stored procedure which does the trick. Search for 'cascade update'. The procedure will, IIRC, generate the required triggers from the constraints.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Mon Feb 25 2008 - 15:41:46 CST

Original text of this message