+ 3
ON UPDATE CASCADE, ON DELETE CASCADE
please how does this two works on two relational tables?
2 Antworten
+ 1
tnx
0
Let's assume that a parent and child table exists where the parent and child link back into one another on a KEY.
ON DELETE CASCADE on the parent key will delete all children that depend on that parent.
ON UPDATE CASCADE on a parent will update the referenced key in the child.
Personally, this is bad practice as it renders your table column's keys unreliable.