MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
来源:互联网 发布:docker swarm 网络 编辑:程序博客网 时间:2024/06/10 22:57
这可能是MySQL在InnoDB中设置了foreign key关联,造成无法更新或删除数据。可以通过设置FOREIGN_KEY_CHECKS变量来避免这种情况。
SET FOREIGN_KEY_CHECKS = 0;
删除完成后设置
SET FOREIGN_KEY_CHECKS = 1;
其他:
关闭唯一性校验
set unique_checks=0;
set unique_checks=1;
http://www.cnblogs.com/william-lin/archive/2013/01/22/2871398.html
0 0
- [MySQL]MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL "Cannot delete or update a parent row: a foreign key constraint fails "
- MySQL错误号1451-Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- MySQL:ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- jbpm Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- #1451 - Cannot delete or update a parent row: a foreign key constraint fails 问题的解决办法
- Cannot delete or update a parent row: a foreign key constraint fails
- jbpm4 jbpm4_execution “Cannot delete or update a parent row: a foreign key constraint fails” 异常解决
- ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails...问题解决
- Swift语言迈出侵蚀Androidd第一步
- 《秘密》卷一:秘密-秘密的发现
- 【Android】获取手机中已安装apk文件信息(PackageInfo、ResolveInfo)(应用图片、应用名、包名等)
- 编码转换函数
- 代码插入测试
- MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- codelity刷题---MinAvgTwoSlice
- Nginx-openresty+mysql+redis使用篇(一)
- Package manager has died at android.app.ApplicationPackageManager.getInstalledPackages
- <11>Android HAL 处理硬件设备访问权限问题
- 有关get_global/local_id/size
- 【UML之用例图】
- AlertDialog(警示/消息对话框)
- Oracle Cursor游标的使用