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

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`))
 

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

你可能感兴趣的:(日常异常记录,SQL异常)