# Pits Collection of MySQL

Posted by Wang Zhihao on 2017-03-30

## Invalid default value for 'TIMESTAMP'

Invalid default value for 'start_time'

• The NO_ZERO_DATE mode affects whether the server permits ‘0000-00-00’ as a valid date. Its effect also depends on whether strict SQL mode is enabled.

• If this mode is not enabled, ‘0000-00-00’ is permitted and inserts produce no warning.
• If this mode is enabled, ‘0000-00-00’ is permitted and inserts produce a warning.
• If this mode and strict mode are enabled, ‘0000-00-00’ is not permitted and inserts produce an error, unless IGNORE is given as well. For INSERT IGNORE and UPDATE IGNORE, ‘0000-00-00’ is permitted and inserts produce a warning.

SET SQL_MODE='ALLOW_INVALID_DATES';