MySQL更新表时 Error Code: 1175. You are using safe update mode and you tried to update a table......

http://blog.csdn.net/abandonship/article/details/7105157

 

Error: 1175 SQLSTATE: HY000 (ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE)
 
Message: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.


Solution:

SET SQL_SAFE_UPDATES = 0;

update T set col = 'xxx' where  condition ……; 

 
posted @ 2013-11-16 17:27  Avrilliu  阅读(503)  评论(0编辑  收藏  举报