“TruncatedincorrectDOUBLEvalue”怎么解决

2025-04-01 22:19:05
推荐回答(2个)
回答1:

有可能字段类型与提供的值的类型不匹配,比如字段为字符型的,与数字进行比较,数字两侧没加引号。

回答2:

Truncated incorrect DOUBLE value解决办法
案例1:我的sql语句是:update sort set sortName='汉字' and parentId=1 and lay=2 where sortId=3
出现mysql 1292-Truncated incorrect double value错误经过检查发现是自己的sql语句写错了应该写为:
update sort set sortName='汉字' , parentId=1,lay=2 where sortId=3

案例2:我的SQL语句是:update sort set num = " + num + " , zt = '1' "
改为:update sort set num = "' + num + "' , zt = '1' "