ALTER TABLE ADD INDEX For Generated Timestamp Column Fails: "ERROR 1067 (42000): Invalid default value for '...'"
(Doc ID 2161925.1)
Last updated on MARCH 23, 2020
Applies to:MySQL Server - Version 5.7 and later
Information in this document applies to any platform.
When trying to add an index to a generated column of the timestamp data type, the ALTER TABLE statement fails like:
The issue may start if explicit_defaults_for_timestamp has been disabled (which is the default) or the SQL mode has been changed.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document