Mysql添加数据时失败 Cannot add or update a child row: a foreign key constraint fails
来源:互联网 发布:淘宝网上台湾是台湾省 编辑:程序博客网 时间:2024/04/29 02:55
用SSM 框架时 添加数据时遇到的问题
Cannot add or update a child row: a foreign key constraint fails
原因:
设置的外键与外键对应的表的主键值不匹配(换句话说你添加外键值在他所对的表中不存在)。
解决方法:
找出不匹配的值修改。
或者清空两表数据。
0 0
- Mysql添加数据时失败 Cannot add or update a child row: a foreign key constraint fails
- mysql添加外键失败:sql 1452 Cannot add or update a child row:a foreign key constraint fails
- [Mysql] 添加外键失败:Cannot add or update a child row:a foreign key constraint fails
- mysql添加外键失败:sql 1452 Cannot add or update a child row:a foreign key constraint fails
- MySql外键添加失败:java.ql.SQLException: Cannot add or update a child row: a foreign key constraint fails
- mysql添加外键失败:sql Cannot add or update a child row:a foreign key constraint fails
- Cannot add or update a child row: a foreign key constraint fails (`mysql`.`ordermx`, CONSTRAINT `kf
- Cannot add or update a child row: a foreign key constraint fails 无法添加外键
- Mysql error 1452 - Cannot add or update a child row: a foreign key constraint fails
- Mysql error 1452 - Cannot add or update a child row: a foreign key constraint fails
- mysql Cannot add or update a child row: a foreign key constraint fails
- Cannot add or update a child row: a foreign key constraint fails (`tsproduct/product`, CONSTRAINT `F
- Cannot add or update a child row: a foreign key constraint fails
- Cannot add or update a child row: a foreign key constraint fails 解决办法
- 1452, 'Cannot add or update a child row: a foreign key constraint fails
- Cannot add or update a child row: a foreign key constraint fails 问题的处理
- Error 'Cannot add or update a child row: a foreign key constraint fails
- error:Cannot add or update a child row: a foreign key constraint fails (`xx库`.`xx表`,
- 《Rethinking the Inception Architecture for Computer Vision》笔记
- 元素出现次数统计
- JS基础总结
- 【C】sizeof 和 strlen 的区别
- JAVA求学之路第九天
- Mysql添加数据时失败 Cannot add or update a child row: a foreign key constraint fails
- HDU 1724 Ellipse 【自适应Simpson积分】
- org.springframework.beans.factory.BeanDefinitionStoreException: IOException
- 初谈学习前的复习与回顾
- JAVA求学之路第十天
- SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)
- 谱聚类
- JAVA继承和重写
- 事件监听器