Home >Database >Mysql Tutorial >Mysql series (14) datetime query exception
Mysql series (fourteen) datetime query exception
Exception: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp (2011-05-25 11:38:40)
#Description: A non-empty Datetime type field with no default value, the program reports the following error when querying: Value ' 0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
Solution: Add zeroDateTimeBehavior parameter or noDatetimeStringSync parameter to the database connection string jdbc:mysql:/ /host:port/xxx?...