I recently ran into a new problem in MySQL. I was going to create a new table with
col1 TIMESTAMP DEFAULT NULL
(i.e. a column that has a default NULL value), but on creation, which gave me an error:
Invalid default value for column
But when I tried col1 TIMESTAMP NULL DEFAULT NULL , this table was created.
I want to know what is the difference between the two above syntaxes. I also came across this problem earlier and in some inserted NULL values ββin a column.
Can someone explain the cause of this problem, for example, is it a specific version problem or something else with MySQL?
source share