Mysql提示Data truncation: Truncated incorrect DOUBLE value

###Mysql执行语句,抛出异常:

org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '10dddd'

###问题原因
Java对象字段类型与数据库字段类型不匹配

[SQL]UPDATE table_a
SET is_deleted = 1
WHERE
	channel_id IN (123456)
[Err] 1292 - Truncated incorrect DOUBLE value: '10dddd'

###解决办法
统一Java与数据库字段的类型,即可解决

[SQL]UPDATE table_a
SET is_deleted = 1
WHERE
	channel_id IN ('123456')

受影响的行: 1
时间: 0.031s

你可能感兴趣的:(java,编程,mysql,java,数据库,mybatis,spring)