1、SET FOREIGN_KEY_CHECKS=0;

2、DELETE FROM ACT_RE_DEPLOYMENT where 1=1;

或者

truncate table ACT_RE_DEPLOYMENT ;

3、SET FOREIGN_KEY_CHECKS=1;

[Err] 1701 - Cannot truncate a table referenced in a foreign key constraint的更多相关文章

  1. django migrate报错:1005 - Can't create table xxx (errno: 150 "Foreign key constraint is incorrectly formed")

    自从mysql升级,以及使用mariaDB以来,很多不曾更新django中model的外键, 今天,按以前的思路写完外键之后, migrate命令报错: 1005 - Can't create tab ...

  2. Could not drop object 'student' because it is referenced by a FOREIGN KEY constraint

    1. Find foreign keys SELECT * FROM sys.foreign_keys WHERE referenced_object_id = object_id('Student' ...

  3. ORA-02266: unique/primary keys in table referenced by enabled foreign keys

    在数据库里面使用TRUNCATE命令截断一个表的数据时,遇到如下错误 SQL >TRUNCATE TABLE ESCMOWNER.SUBX_ITEM ORA-02266: unique/prim ...

  4. 关于mysql中[Err] 1451 -Cannot delete or update a parent row: a foreign key constraint fails

    mysql> SET FOREIGN_KEY_CHECKS = 0; Query OK, 0 rows affected (0.02 sec)   mysql> delete from r ...

  5. MySQL添加外键报错 - referencing column 'xx' and referenced column 'xx' in foreign key constraint 'xx' are incompatible

    MySQL给两个表添加外键时,报错 翻译意思是:外键约束“xx”中的引用列“xx”和引用列“xx”不兼容 说明两个表关联的列数据类型不一致,比如:varchar 与 int,或者 int无符号 与 i ...

  6. SQL Server 2008 R2——TRUNCATE TABLE 无法截断表 该表正由 FOREIGN KEY 约束引用

    =================================版权声明================================= 版权声明:原创文章 禁止转载  请通过右侧公告中的“联系邮 ...

  7. sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1091, "Can't DROP 'users_ibfk_1'; check that column/key exists") [SQL: ALTER TABLE users DROP FOREIGN KEY users_ibfk_1]

    flask 迁移数据库报错 报错: sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1091, "Can't DROP ...

  8. sqlserver truncate清空表时候,无法删除 'B表',因为该表正由一个 FOREIGN KEY 约束引用。

    外键: 查询:select object_name(a.parent_object_id) 'tables'  from sys.foreign_keys a  where a.referenced_ ...

  9. sql: Query to Display Foreign Key Relationships and Name of the Constraint for Each Table in Database

    --20170505 --塗聚文 Geovin Du CREATE DATABASE DuMailSystem GO USE DuMailSystem GO --1查詢表的及备注说明 SELECT S ...

随机推荐

  1. 在命令行中插入TAB键

    参考man bash: quoted-insert (C-q, C-v) Add the next character typed to the line verbatim.  This is how ...

  2. linux nohup python 后台运行无输出问题

    参考:https://blog.csdn.net/zj360202/article/details/78894512 nohup python test.py & nohup python t ...

  3. 如何在Web项目中配置Spring MVC

    要使用Spring MVC需要在Web项目配置文件中web.xml中配置Spring MVC的前端控制器DispatchServlet <servlet> <servlet-name ...

  4. 【牛客网-剑指offer】用两个栈实现队列

    题目: 用两个栈来实现一个队列,完成队列的Push和Pop操作. 队列中的元素为int类型. 知识点及概念: 队列:队列是一种特殊的线性表,特殊之处在于它只允许在表的前端(front)进行删除操作,而 ...

  5. 2018-8-10-wpf-单例

    title author date CreateTime categories wpf 单例 lindexi 2018-08-10 19:16:53 +0800 2018-2-13 17:23:3 + ...

  6. dubbo-源码阅读之服务发布

    原理 dubbo根据spring 2.0的schma实现 解析xml并初始化相关bean 初始化dubbo:service为ServiceBean实例  通过spring的生命周期相应回调实现服务发布 ...

  7. C#开发activex

    https://www.cnblogs.com/bobshieh/p/5746844.html

  8. 【Javascript DOM读书笔记】chapter8 充实文档内容

    本章目的 作者举出了第一个实例,为一篇 web 页面动态创建缩略语(abbreviation)的列表.大家知道,我们可以使用 <abbr>...</abbr> 来指示一个缩略语 ...

  9. dubbo管理平台安装

    dubbo-admin.war可在网上百度去下载,但是我下载了好几个,发布上去服务启动都报错,这个时候大概是我们系统的JDK和编译dubbo-admin.war的JDK版本不同导致的了,强烈建议自己下 ...

  10. Thread.Join理解

    Thread.Join:Blocks the calling thread until a thread terminates MainThread里面起了一个SubThread,从SubThread ...