Data truncation: Truncated incorrect DOUBLE value:

在写sql查询语句queryRunner.update(connection,"update account set balance=? where name=?",account.getName(),account.getBalance());时出现java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE value: 'zhangsan' Query: update account set balance=? where name=? Parameters: [zhangsan, 800]异常,

原因是查询语句里的参数account.getName(),account.getBalance()位置写反了,应该与sql语句里的一致.

posted @ 2017-02-07 10:12  無玑小姐  阅读(2692)  评论(0编辑  收藏  举报