mysql更新数据时候的一个异常

用mysql workbench 更新一个表的时候报如下异常:

Error Code: 1175. To disable safe mode, toggle the option in Preferences -> SQL Editor -> Query Editor and reconnect.

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

 

使用安全更新模式的时候update语句必须使用一个关键字列属性来限定更新的范围。如果不使用关键字列来限定范围或更新所有记录的时候就不能用安全更新模式。

解决办法是执行以下语句设置为非安全更新模式.

 

SET SQL_SAFE_UPDATES=0;

转自:http://hchen229.iteye.com/blog/1006091

posted on 2013-04-27 08:59  只愿软禁  阅读(193)  评论(0)    收藏  举报