级联删除设置外键方法

 alter table orders add constraint FK_CUSTOMER foreign key (customer_id) references customers(id);

 alter table orders add constraint FK_CUSTOMER foreign key (customer_id) references customers(id)  on delete cascade on update cascade;

原文地址:https://www.cnblogs.com/yujinchao88/p/3680516.html