Django Mode: Cannot delete or update a parent row, a foreign key constraint fails
来源:互联网 发布:java需要英语基础吗 编辑:程序博客网 时间:2024/06/04 08:45
在删除数据库中的表时,遇到这个问题, 要删除的表是另外一个表的外键,drop table 时操作不成功, 在stackoverfolwer上找到解决方法:
SET FOREIGN_KEY_CHECKS=0; DROP TABLE my_first_table_to_drop; DROP TABLE my_second_table_to_drop; SET FOREIGN_KEY_CHECKS=1;
先禁止数据库对foreignkey的检查,然后删除要删除的表,最后在恢复数据库的foreignkey检查 0 0
- Django Mode: Cannot delete or update a parent row, a foreign key constraint fails
- 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 "
- jbpm 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
- 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
- #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...问题解决
- Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails解决方法
- 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]MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
- iOS端阿里云推送报错:ALBB OneSDK init failure Code=100 "(null)"
- html meta中的viewport指令
- 打字比赛
- Android进程管理详解
- java注解 @
- Django Mode: Cannot delete or update a parent row, a foreign key constraint fails
- linux系统Ubuntu下简易安装mqtt
- javascript--贪食蛇(完整版-逻辑思路)
- 数据库三范式
- Android 短信验证码自动填写
- 判断TableView ScrollView 是向上滑动,还是向下滑动
- AndroidM如何给所有预装软件所有请求的权限
- jquery如何获取用户表单提交值
- Educational Codeforces Round 13 (ABCD ....ing)