宇筱博客

  • 解决办法
  • 学无止境
  • 记录时光
  • 百宝箱
宇筱博客
点滴记忆,汇聚成海。
  1. 首页
  2. 解决办法
  3. 正文

mysql 更新记录报错"Truncated incorrect DOUBLE value"

2022年10月20日 134点热度 0人点赞 0条评论

前两天使用mysql数据库,手写的sql语句去更新记录,报错"Truncated incorrect DOUBLE value",很懵逼,网上查了以后,找到了解决方案:
是我的parent_id=2写错了,因为parent_id是varchar类型,我直接给了int值,,改成parent_id='2'就好了。

看到了mysql官网的bug记录,提到了这个问题。https://bugs.mysql.com/bug.php?id=63112
大致是说mysql默认的SQL_MODE 是strict mode 导致的,可以查看show VARIABLES like '%SQL_MODE%';。

原文链接:点击进入

Post Views: 77
标签: 暂无
最后更新:2022年11月1日

小渔民

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2023 渔人码头. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备15017825号-2