MySQL Error Code:1175异常

情形一:

Error Code: 1175

You are using safe...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]按钮

情形二:

错误描述:Message: You are using safe update mode and you tried to update a table without...

错误原因:是在safe mode下,要强制安全点,update只能跟where

解决方法:执行:SET SQL_SAFE_UPDATES = 0;
 

猜你喜欢

转载自blog.csdn.net/qq_39915099/article/details/134316627