Magento1.9.x mysql清空产品报错
Magento1.9.x mysql清空产品报错
不能截断表,因为它正在被FOREIGN KEY约束引用
错误
SQL 查询:
TRUNCATE TABLE `catalog_product_bundle_option`
MySQL 返回:
#1701 - Cannot truncate a table referenced in a foreign key constraint (`m1database`.`catalog_product_bundle_option_value`, CONSTRAINT `FK_CAT_PRD_BNDL_OPT_VAL_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `m1database`.`catalog_product_b)
前后加这依旧报错
SET FOREIGN_KEY_CHECKS = 0;
SET FOREIGN_KEY_CHECKS = 1;
admin 已回答