mysql datetime查询异常问题解决
mysql datetime查询异常
异常:Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp (2011-05-25 11:38:40) 描述:非空无默认值的Datetime类型字段,查询时程序报以下错误: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp 解决方法:数据库连接串添加zeroDateTimeBehavior参数或者noDatetimeStringSync参数jdbc:mysql://host:port/xxx?...zeroDateTimeBehavior:取值exception、converToNull、round
noDatetimeStringSync:设置为true,返回0000-00-00 00:00:00
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
《mysql datetime查询异常问题解决》阅读地址:http://www.haoshilao.net/13648/
已有0条评论,点击查看发表评论