com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE

        今天编写Demo小程序测试的时候,遇到了这个错误。经过查阅资料发现只需要将 update sql语句中的  and 换成 ,


        报错信息:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE


        原sql:String sql = "update account set name = ? and money = ? where id = ?";

        改:String sql = "update account set name = ? , money = ? where id = ?";

        

       完美解决!

猜你喜欢

转载自blog.csdn.net/lvhaoguang0/article/details/80980290
今日推荐