sql报错:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'sf'

在这里插入图片描述

在更新数据库文件的时候写了如下代码

update s_clazz set name = 'sf' and info = 'asdfasfsdddddddd' where id = 7

会报上面的错误

解决

把里面的and改为逗号,如下所示

update s_clazz set name = 'sf',info = 'asdfasfsdddddddd' where id = 7
发布了108 篇原创文章 · 获赞 29 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/Gabriel_wei/article/details/104313657