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?...
- ##zeroDateTimeBehavior: value exception, convertToNull, round
- exception---Exception thrown: Result java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql .Timestamp.
- converToNull: Returns null value
- round: Returns 0001-01-01 00:00:00.0
##noDatetimeStringSync: Set to true, return 0000-00-00 00:00: 00 The above is the content of the datetime query exception in the Mysql series (fourteenth). For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!