Re: Exists foreign key "on update cascade"
Date: Mon, 25 Feb 2008 22:41:46 +0100
On Mon, 25 Feb 2008 15:50:26 +0100, Norbert Winkler <Norbert.Winkler1_at_gmx.de> wrote:
>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 DBAReceived on Mon Feb 25 2008 - 15:41:46 CST