|
|
Re: ON DELETE CASCADE and ON UPDATE CASCADE [message #385482 is a reply to message #385475] |
Mon, 09 February 2009 19:56   |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
ON DELETE CASCADE means when you delete the parent of a foreign key relationship, the chilren are deleted too. It is supported natively by Oracle - you can specify it when you create a foreign key constraints
ON UPDATE CASCADE means that when you update the PRIMARY KEY on the parent of a foreign key relationship, the FOREIGN KEY of the child is also updated. It is NOT supported natively by Oracle - you must code it yourself using triggers.
Ross Leishman
|
|
|
|
Re: ON DELETE CASCADE and ON UPDATE CASCADE [message #385671 is a reply to message #385482] |
Tue, 10 February 2009 08:36  |
dandeliondream
Messages: 12 Registered: February 2009
|
Junior Member |
|
|
rleishman wrote on Mon, 09 February 2009 19:56 | ON DELETE CASCADE means when you delete the parent of a foreign key relationship, the chilren are deleted too. It is supported natively by Oracle - you can specify it when you create a foreign key constraints
ON UPDATE CASCADE means that when you update the PRIMARY KEY on the parent of a foreign key relationship, the FOREIGN KEY of the child is also updated. It is NOT supported natively by Oracle - you must code it yourself using triggers.
Ross Leishman
|
Thanks for the explanation. I think i have a better understanding now.
|
|
|