21

In MySQL Workbench, how do you set up a cascading delete on a relationship?

I clicked the relationship line and clicked on properties but I do not see any mention of a cascading delete option.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
MadSeb
  • 7,958
  • 21
  • 80
  • 121

1 Answers1

54

Right Click On Table -> Alter Table -> Foreign Keys Tab

Look at the upper-right corner "Foreign Key Options", there are two drop down boxes, one is to specify the delete action: "On Delete"

enter image description here

J Cooper
  • 4,828
  • 3
  • 36
  • 39