文章出處

在寫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語句里的一致.


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜

    大師兄 發表在 痞客邦 留言(0) 人氣()