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;
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