Mysql系列(十四)datetime查詢異常
異常:Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp (2011-05-251-05:38 :40)
描述:非空無預設值的Datetime類型字段,查詢時程式報以下錯誤: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestampjava
解決方法:資料庫連線字串新增zeroDateTimeBehavior參數或noDatetimeStringSync參數jdbc:mysql://host:port/xxx?...