标签:
第一步:删除原有的外键约束
ALTER TABLE child_table DROP FOREIGN KEY `FK_Reference_2` ;
ALTER TABLE child_table ADD CONSTRAINT `FK_Reference_2` FOREIGN KEY (`parent_id` ) REFERENCES parent_table (`parent_id` ) ON DELETE CASCADE ON UPDATE RESTRICT;
mysql SQL设置外键约束ON DELETE CASCADE
标签:
原文地址:http://my.oschina.net/simpleton/blog/517409