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
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在mysql5中,可以設(shè)置safe mode,比如在一個(gè)更新語(yǔ)句中
UPDATE table_name SET bDeleted=0;
執(zhí)行時(shí)會(huì)錯(cuò)誤,報(bào):
You are using safe update mode and you tried to update a table without a WHERE clause that uses a KEY column.”
? 原因是在safe mode下,要強(qiáng)制安全點(diǎn),update只能跟where了,
要取消這個(gè)限制,可以:
? ? SET SQL_SAFE_UPDATES=0;
即可
總結(jié)
以上是生活随笔為你收集整理的rror Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: windows上安装mysql
- 下一篇: MySQLWorkbench里的稀奇事之