MySql 執(zhí)行 DELETE FROM Table 時(shí),報(bào) 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. 錯(cuò)誤,這是因?yàn)?MySql 運(yùn)行在 safe-updates模式下,該模式會(huì)導(dǎo)致非主鍵條件下無(wú)法執(zhí)行update或者delete命令,執(zhí)行命令如下命令
SET SQL_SAFE_UPDATES = 0;
修改下數(shù)據(jù)庫(kù)模式,然后就可以繼續(xù)執(zhí)行 DELETE/UPDATE 了
如果想改會(huì) safe-updates模式,執(zhí)行如下命令即可
SET SQL_SAFE_UPDATES = 1;