“Truncated incorrect DOUBLE value” 怎么解决

2025-03-23 11:15:09
推荐回答(1个)
回答1:

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' "