Re: Exists foreign key "on update cascade"

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: Mon, 25 Feb 2008 09:03:28 -0800 (PST)
Message-ID: <17cc602d-2506-41c9-b851-98a9e7acf3bc@n75g2000hsh.googlegroups.com>


On Feb 25, 9:50 am, Norbert Winkler <Norbert.Winkl..._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
>
> --
> Norbert

By convention, primary key values should never be changed. Updating a primary key (even with the same value) will cause a full table lock on the foreign tables that reference the primary key unless an index is created on those columns in the foreign tables.

You might try the following Google search:   "cascade update" primary key oracle

A couple links returned that might be helpful: http://asktom.oracle.com/tkyte/update_cascade/index.html http://download.oracle.com/docs/html/B10255_01/b.htm

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. Received on Mon Feb 25 2008 - 11:03:28 CST

Original text of this message