今天编写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 = ?";
完美解决!