Home » SQL & PL/SQL » SQL & PL/SQL » Related ON DELETE CASCADE Command (oracle 9i)
Related ON DELETE CASCADE Command [message #356522] Fri, 31 October 2008 00:15 Go to next message
APARNA.B
Messages: 2
Registered: October 2008
Junior Member
Hi,


when we delete the row from the child table ,it should automatically reflect in the master table and vice versa as per ON DELETE CASCADE Command .
My Doubt is like if there will be multiple rows(since duplicates are allowed for foreign key) in the child table pertaining to the master row,exactly when the impact come in to action,so that the concerned row will be get deleted from the master table as well.

Can anyone brief me about ON DELETE CASCADE Command.

Regards
Aparna

Re: Related ON DELETE CASCADE Command [message #356525 is a reply to message #356522] Fri, 31 October 2008 00:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ON DELETE CASCADE only works for parent to child.
When you delete a parent key, it deletes all children.
There is nothing for the opposite (why should it? A parent may have no child).

Regards
Michel
Re: Related ON DELETE CASCADE Command [message #356534 is a reply to message #356522] Fri, 31 October 2008 00:48 Go to previous message
APARNA.B
Messages: 2
Registered: October 2008
Junior Member
Hi Michel,

Thanks for your quick reply...
i thought ON DELETE CASCADE works in both conditions.
it's true ,it shouldn't be required.
Thank a lot.

Regards
Aparna
Previous Topic: About USER_TABLES error
Next Topic: Ref Cursors
Goto Forum:
  


Current Time: Sun Dec 04 02:20:56 CST 2016

Total time taken to generate the page: 0.07151 seconds