MySql执行语句常见问题(Error Code: 1175、1292)

错误: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

原因:安全模式,非主键条件无法执行update或者delete命令,

           执行命令 SET SQL_SAFE_UPDATES = 0 即可。

错误:更新时 [Err] 1292 - Truncated incorrect DOUBLE value: ','

原因:一般出现在用+拼接更新语句,语法不严谨 需要使用CONCAT()函数拼接字符串

猜你喜欢

转载自blog.csdn.net/CommandBaby/article/details/81698744