1.问题描述
在执行sql修改语句的时候,报错误:Truncated incorrect DOUBLE value。
sql如下:
update `finance_outcome` set `create_by` = 'admin' and `UPDATE_BY` = 'admin' and `CREATE_TIME` = '2022-06-02 00:00:00' and `UPDATE_TIME` = '2022-06-02 00:00:00' WHERE `CREATE_BY` is null
2.原因分析
仔细检查了一下,sql写错了,应该把and换成逗号,正确的sql如下:
update `finance_outcome` set `create_by` = 'admin',`UPDATE_BY` = 'admin' ,`CREATE_TIME` = '2022-06-02 00:00:00' , `UPDATE_TIME` = '2022-06-02 00:00:00' WHERE `CREATE_BY` is null