Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorr
2017-08-23 11:48
459 查看
Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect
Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value:
解决方法
在mybatis 的xml文件中制定数据库字段类型原来的xml如下
<delete id="deleteByCustomerId" parameterType="java.lang.String"> delete from customer_manage where customer_id =${customerId} </delete>
修改为
#{}(需要将mapper里用
@param注解方式传入参数,并添加
jdbcType=VARCHAR
<delete id="deleteByCustomerId" parameterType="java.lang.String"> delete from customer_manage where customer_id =#{customerId, jdbcType=VARCHAR} </delete>
相关文章推荐
- ### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column \'name\' at row 1
- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'content' at ro
- ### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'articleTit
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: 解决方法
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'L
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'L
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'L
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '' for column 'date' at row 1
- Eexception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'PIC' at
- com.mysql.jdbc.MysqlDataTruncation: Data truncation异常
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
- mysql 插入中文报错: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value...
- mysql 插入中文报错: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value...
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE
- 数据库编码com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sex' at row 1
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sex' at row 1”
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value:
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'content' a
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'content' a
- ssh框架中的错误:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'user_name'