Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ON DELETE CASCADE and CASCADE CONSTRAINTS - What are The Difference?

712917Jul 24 2009 — edited Jul 24 2009
I know that CASCADE CONSTRAINTS would allow me to delete the parent key and all subsequent child reference constraints will be released. However, the child columns will remain there and will carry value NULL.

SO:

If CASCADE CONSTRAINTS could do the job, why do we need ON DELETE CONSTRAINTS?

Extra Unnecessary note:

I know ON DELETE CONSTRAINT is defined with the child. When i tried to delete the parent key without having CASCADE CONSTRAINTS, i got an error message says the parent key has childs! So ON DELETE CASCADE did not work until i had to mention CASCADE CONSTRAINTS when dropping the parent key whilst CASCADE CONSTRAINTS worked fine without having ON DELETE CASCADE on the child side.

I hope my question is clear...
This post has been answered by Mohammed Mehraj Hussain on Jul 24 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2009
Added on Jul 24 2009
2 comments
17,450 views