更新数据库中数据时出现: Error Code: 1175. 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 问题
使用workbench在数据库中更新数据时报错: 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(错误及操作见截图)
1.sql: update tableName set employee_detailed_status='xx', employee_status_code='xx' where employee_detailed_status='xx'
2.通过错误提示可以看出: 当前数据库使用的是 safe update mode(安全更新模式),并且在update时where 中没有把主键当做条件。因为在该模式会导致非主键条件下无法执行update或者delete命令,因此会报错。
3.如何解决这个问题呢?
第一种方法:
执行命令SET SQL_SAFE_UPDATES = 0 来修改下数据库模式,这样再去执行update语句或者delete语句即可成功。
参考地址: https://jingyan.baidu.com/article/6c67b1d6f0efca2787bb1eba.html
第二种方法:
(1) 在workbench的菜单栏点击“edit-->Preferences”,然后会弹出对话框“workbench preferences”。
(2) 在“workbench”左边栏点击“SQL Editor”,会看到最后一行是“Safe Updates……”是打钩的,我们只要缺消打钩即可。
当缺消打钩之后,点击“OK”按钮,linux系统可能会出现“OK”按钮无法点击的情况,请在左边栏点击“General Editors”选项,这样就可以点击“OK”按钮了。
(3) 当上面设置好之后,请重启workbench。
参考地址: https://jingyan.baidu.com/article/6c67b1d6f0efca2787bb1eba.html
更新数据库中数据时出现: Error Code: 1175. 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 问题的更多相关文章
- Error Code: 1175. 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 Queries and reconn
使用MySQL执行update的时候报错: MySQL 在使用mysql执行update的时候,如果不是用主键当where语句,会报如下错误,使用主键用于where语句中正常. 异常内容: ...
- 【MySQL笔记】解除输入的安全模式,Error Code: 1175. 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 Queries and reconnect.
Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha ...
- MySQL错误:Error Code: 1175. 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 easonjim
错误: Error Code: . You are using safe update mode and you tried to update a table without a WHERE tha ...
- mysql 报错:Error Code: 1175. 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
目录 #事故现场 #解决方法 #事故现场 mysql执行update操作报错: sql如下: update psmp.Users set name='Jack' where name='Lily'; ...
- Mysql Error Code: 1175. 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
今天用mysql workbench在更新数据的时候,出现了下面错误:15:52:39 update wp_posts set post_content = replace(post_conte ...
- mysql更新字段值提示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
1 引言 当更新字段缺少where语句时,mysql会提示一下错误代码: Error Code: 1175. You are using safe update mode and you tried ...
- Mysql Workbench 执行sql语句删除数据时提示error code 1175
error code 1175是因为有安全模式限制 执行命令SET SQL_SAFE_UPDATES = 0;之后可以进行操作
- rror Code: 1175. 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 reconnec
在mysql5中,可以设置safe mode,比如在一个更新语句中 UPDATE table_name SET bDeleted=0; 执行时会错误,报: You are using safe upd ...
- Error Code: 1175. 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 recon
数据库默认模式是主键不可进行修改操作,所以需要运行以下语句. SET SQL_SAFE_UPDATES = 0; -- 出现error1175使用.
随机推荐
- Javascript IE 内存释放
一个内存释放的实例 <SCRIPT LANGUAGE="JavaScript"><!--strTest = "1";for ( var i = ...
- CentOS 6.4 linux下编译安装MySQL5.6.14
CentOS 6.4下通过yum安装的MySQL是5.1版的,比较老,所以就想通过源代码安装高版本的5.6.14. 正文: 一:卸载旧版本 使用下面的命令检查是否安装有MySQL Server rpm ...
- 慎将MBTI测试用于招聘或就业:4星|《人格魅力修炼指南》
人格魅力修炼指南:成为理想中的自己,就靠它了!(<哈佛商业评论>增刊) <哈佛商业评论>的11篇领导者人格魅力相关的文章.比较专业. 一些重要的信息:慎将MBTI测试用于“招聘 ...
- python中break、continue 、exit() 、pass终止循环的区别
python中break.continue .exit() .pass区分 1.break:跳出循环,不再执行 Python break语句,就像在C语言中,打破了最小封闭for或while循环. b ...
- 【转】Web 前沿——HTML5 Form Data 对象的使用
XMLHttpRequest Level 2 添加了一个新的接口——FormData.利用 FormData 对象,我们可以通过 JavaScript 用一些键值对来模拟一系列表单控件,我们还可以使用 ...
- 【原创】如何编写c#用户登陆后用户名在前台显示
这种肯定是判断session啦!!!!! @{ string username = (string)Session["username"]; user user = new use ...
- dom监听事件class
layui.use(['layer', 'form'], function(){ var layer = layui.layer ,form = layui.form; var $ = layui.j ...
- filezilla server FTP 安装报错 "could not load TLS network. Aborting start of administration interface"
filezilla server FTP 安装报错 "could not load TLS network. Aborting start of administration inter ...
- RNN,LSTM,GRU基本原理的个人理解
记录一下对RNN,LSTM,GRU基本原理(正向过程以及简单的反向过程)的个人理解 RNN Recurrent Neural Networks,循环神经网络 (注意区别于recursive neura ...
- windows mac配置host方法
配置host方法如下: 1.windows 系统配置host (1)打开电脑的系统盘(一般默认为C盘):C盘 -> Windows -> System32 -> drives -&g ...