当前位置:   article > 正文

SQL 错误 Cannot add or update a child row: a foreign key constraint fails (`o2o`.`tb_product_img`, CON_a foreign key constraint fails (`ry`.`sys_purchase

a foreign key constraint fails (`ry`.`sys_purchase`, constraint `fk_product_

Cannot add or update a child row: a foreign key constraint fails (`o2o`.`tb_product_img`, CONSTRAINT `fk_product_img_product` FOREIGN KEY (`product_id`) REFERENCES `tb_product` (`product_id`))
 

外键不匹配,去查找插入的外键,和对应的外键的表是否有这个值。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/164214
推荐阅读
  

闽ICP备14008679号