Mysql workbench update时报错 1175
Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
看出:出处于保护机制,不允许这样操作。
查阅其他大哥的文章(https://blog.csdn.net/yhawaii/article/details/7941948)
发现解决方法为:
set SQL_SAFE_UPDATES = 0; /*设置一下就行*/
update `taotao2`.`Student`
set Sage = Sage- 1;
知识普及
SQL_SAFE_UPDATES = 0时,update和delete操作将会顺利执行。
此变量的默认值是1。