zoukankan      html  css  js  c++  java
  • ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails

    mysql 删除表时提示有外键

    mysql> drop tables auth_group;
    ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
    mysql>
    mysql>
    mysql>
    mysql> SET FOREIGN_KEY_CHECKS = 0;
    Query OK, 0 rows affected (0.00 sec)

    mysql> drop tables auth_group;
    Query OK, 0 rows affected (0.01 sec)

    最后要要修改原样
    mysql> SET FOREIGN_KEY_CHECKS = 1;
    Query OK, 0 rows affected (0.00 sec)

    mysql>

  • 相关阅读:
    0722
    SGU
    预测一下吧
    0625
    0624
    0610
    0607
    0604
    poj2455Secret Milking Machine【二分 + 最大流】
    BZOJ3489: A simple rmq problem
  • 原文地址:https://www.cnblogs.com/sxwen/p/7840089.html
Copyright © 2011-2022 走看看