600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > rror Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that

rror Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that

时间:2021-03-25 18:26:44

相关推荐

rror Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that

在mysql5中,可以设置safe mode,比如在一个更新语句中

UPDATE table_name SET bDeleted=0;

执行时会错误,报:

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

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

要取消这个限制,可以:

SET SQL_SAFE_UPDATES=0;

即可

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。