MySQL禁用安全模式
我們使用MySQL8.0執行update的時候,where陳述句如果不是用的主鍵,就會報錯: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 Editor and reconnect. 0.000 sec 您正在使用安全更新模式,并試圖更新一個沒有使用鍵列的WHERE的表,
要禁用安全模式,在首選項-> SQL編輯器中切換選項并重新連接,
所以此時我們需要禁用安全模式,只需執行以下陳述句即可:
set sql_safe_updates=0;
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/23027.html
標籤:AI
