热线电话:13121318867

登录
2021-01-26 阅读量: 998
MySQL出现Data truncated for column 'date' at row 1 的错误解决方案

严重: Servlet.service() for servlet [spring-mvc] in context with path [/DBDX] threw exception [Request processing failed; nested exception is com.dbdx.util.DaoException: 数据库操作失败!; nested exception is org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into z_praise(kt_id,t_id,date,deleted) values(?,?,?,?)]; Data truncated for column 'date' at row 1; nested exception is java.sql.SQLException: Data truncated for column 'date' at row 1] with root cause

java.sql.SQLException: Data truncated for column 'date' at row 1

在看到SQLException后开始以为是sql语句写错的原因,但反复检查后还是不行,后发现是数据库表的类型是int可能数据长度不够,改为varchar解决。


62.9467
0
关注作者
收藏
评论(0)

发表评论

暂无数据