码迷,mamicode.com
首页 > 其他好文 > 详细

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that

时间:2015-08-03 20:44:14      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

转载自:

http://blog.csdn.net/amohan/article/details/9980315

 

快速高效用:SET SQL_SAFE_UPDATES = 0;下面的就不要看了!

今日用MySQL Workbench进行数据库的管理更新时,执行一个更新的语句碰到以下错误提示:

Error Code: 1175

You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

 

进过一番搜索之后发现原来是MySQL Workbench的安全设置。当要执行的SQL语句是进行批量更新或者删除的时候就会提示这个错误。

 

解决方法如下:

  • 打开Workbench的菜单[Edit]->[Preferences...]
  • 切换到[SQL Editor]页面
  • [Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)]之前的对勾去掉
  • 点击[OK]按钮
  • 最后一步记得要重启一下Workbench,否则你仍然会得到这个错误提示。

 

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that

标签:

原文地址:http://www.cnblogs.com/gisyk/p/4700215.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!