Re: Exists foreign key "on update cascade"
Date: Mon, 25 Feb 2008 09:03:28 -0800 (PST)
On Feb 25, 9:50 am, Norbert Winkler <Norbert.Winkl..._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
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
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. Received on Mon Feb 25 2008 - 11:03:28 CST