MySQL Workbench批量更新或删除

时间:2015-08-31 15:32:38   收藏:0   阅读:974

在使用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 To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect. 0.000 sec

因为是MySQL Workbench的默认的安全设置是不能批量更新表的。

解决方法:

一、在SQL语句之前添加

    SET SQL_SAFE_UPDATES = 0;

二、修改MySQL Workbench设置:


评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!