JAVA: String or binary data would be truncated 异常解决办法
来源:互联网 发布:尚学堂java视频下载 编辑:程序博客网 时间:2024/06/07 22:47
提示:String or binary data would be truncated.
步骤:在执行插入语句时,会提示上面的error。
原因:是因为数据库中定义的字段长度比较小,在插入或者更新的时候,用一个比这个字段长度大的值去操作,就会引起这个错误。
2016/10/12 03:44:41,674 [org.hibernate.util.JDBCExceptionReporter]-[WARN] SQL Error: 0, SQLState: 220012016/10/12 03:44:41,674 [org.hibernate.util.JDBCExceptionReporter]-[ERROR] Data truncation2016/10/12 03:44:41,674 [org.hibernate.util.JDBCExceptionReporter]-[WARN] SQL Error: 8152, SQLState: 220012016/10/12 03:44:41,674 [org.hibernate.util.JDBCExceptionReporter]-[ERROR] String or binary data would be truncated.2016/10/12 03:44:41,674 [org.hibernate.event.def.AbstractFlushingEventListener]-[ERROR] Could not synchronize database state with session
从excel读取数据保存到数据库,10W级,恰好有一条数据的某个字段异常,出现这个错误,害死我了。
0 0
- JAVA: String or binary data would be truncated 异常解决办法
- String or binary data would be truncated 异常解决办法
- String or binary data would be truncated 异常解决办法
- String or binary data would be truncated.
- String or binary data would be truncated.解决方法
- Error: String or binary data would be truncated
- String or binary data would be truncated[解决方案]
- Error: String or binary data would be truncated. The statement has been terminated
- GIT 提交异常 fatal: LF would be replaced by CRLF
- CircuitBreakingException[[FIELDDATA] Data too large, data for [proccessDate] would be larger than li
- 异常 int() argument must be a string or a number, not 'ShopCar'
- JSONException:java.lang.String cannot be converted to JSONObject解决办法
- JSONException:java.lang.String cannot be converted to JSONObject解决办法
- Truncated Binary Encoding
- SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'dtdate' 解决方法
- SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'dtdate' 解决方法
- something would be.
- which would be better served with an electric machine. If your needs are small or moderate
- 快速排序算法
- php中的预定义变量
- WPF布局系统(常用布局面板)
- SSO-CAS-Http配置
- ssh时遇到 WARNING: POSSIBLE DNS SPOOFING DETECTED! 的解决方法
- JAVA: String or binary data would be truncated 异常解决办法
- dlopen undefined symbol
- JavaWeb中Servlet的生命周期方法
- yii memcahed
- 将xml解析成map
- js前端预防xss攻击的方法
- CSS之幻灯片
- AWK原理及命令和文件输入
- Android 增量更新完全解析