MySQL清空具有外键约束的表中id自增长报1701解决方法
一、开发中遇到测试数据清空时,发现tbl_dept表自增长的id是tbl_emp表的外键,使用TRUNCATE TABLE tbl_dept;语句会报错。
错误信息如下:
1 queries executed, 0 success, 1 errors, 0 warnings
查询:truncate table tbl_dept
错误代码: 1701
Cannot truncate a t
转载
2018-01-29 10:44:54 ·
707 阅读 ·
0 评论