表格式与输入的值冲突错误BUG处理分享

82 阅读1分钟

1.sql语法错误

The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: update tb_sku          SET sku_name=?                                           sku_image=?

java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right 

经检查,是update的条件后面没加"''"

2.表格式与输入的值冲突错误

### SQL: insert into tb_company (name,contact,mobile,ratio,account,password) values (?,?,?,?,?,?)
### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Out of range value for column 'mobile' at row 1

表格电话号码11位应该为BigInt类型