ON DELETE CASCADE and CASCADE CONSTRAINTS - What are The Difference?
712917Jul 24 2009 — edited Jul 24 2009I 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...