首页 > 数据库技术 > 详细

mysqlworkbench 执行update语句报错:You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

时间:2019-06-19 10:49:15      阅读:172      评论:0      收藏:0      [点我收藏+]
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.  
To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect

技术分享图片

解决办法1:

其实错误提示中已经给出了解决办法了

关闭安全模式:

Edit --> Preferences --> SQL Editors-->取消沟选 Safe Updates 先项

技术分享图片

技术分享图片

 

别忘记重启MysqlWorkbench,重启之后就可以正常执行更新语句了
技术分享图片

 


解决办法2:
参考:https://blog.csdn.net/sanpic/article/details/79879408

可以通过以下SQL进行状态查询


showvariables like sql_safe%;

解决方案:

  1. 执行SQL:
    set sql_safe_updates=0;
    或
    set sql_safe_updates=off;

 



mysqlworkbench 执行update语句报错:You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

原文:https://www.cnblogs.com/kaerxifa/p/11049888.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!