2031 Automatic Initialization and Updating for TIMESTAMP and DATETIME column to  NULL , not the current timestamp. To assign the current timestamp, set the column to CURRENT_TIMESTAMP  or a synonym such as  NOW() . Consider these table definitions: The tables have these properties: If a  TIMESTAMP  or  DATETIME  column definition includes an explicit fractional seconds precision value anywhere, the same value must be used throughout the column definition. This is permitted: This is not permitted: If the  explicit_defaults_for_timestamp  system variable is disabled,  TIMESTAMP  columns by default are  NOT NULL , cannot contain  NULL  values, and assigning  NULL  assigns the current timestamp. To permit a  TIMESTAMP  column to contain  NULL , explicitly declare it with the  NULL  attribute. In this case, the default value also becomes  NULL  unless overridden with a  DEFAULT  clause that specifies a different default value.  DEFAULT NULL  can be used to explicitly specify  NULL  as the default value. (For a  TIMESTAMP  column not declared with the  NULL  attribute,  DEFAULT NULL  is invalid.) If a  TIMESTAMP column permits  NULL  values, assigning  NULL  sets it to  NULL , not to the current timestamp. The following table contains several  TIMESTAMP  columns that permit  NULL  values: CREATE TABLE t ( ts1 TIMESTAMP NULL DEFAULT NULL, ts2 TIMESTAMP NULL DEFAULT 0, ts3 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP TIMESTAMP Initialization and the NULL Attribute CREATE TABLE t1 ( ts TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(3) ); CREATE TABLE t1 ( ts TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) ); • t2  and  t3  differ in the default value for  ts1 . For  t2 ,  ts1  is defined to permit  NULL , so the default is also NULL  in the absence of an explicit  DEFAULT  clause. For  t3 ,  ts1  permits  NULL  but has an explicit default of 0. •In each table definition, the first  TIMESTAMP  column has no automatic initialization or updating. •The tables differ in how the  ts1  column handles  NULL  values. For  t1 ,  ts1  is  NOT NULL  and assigning it a value of  NULL  sets it to the current timestamp. For  t2  and  t3 ,  ts1  permits  NULL  and assigning it a value of  NULL  sets it to  NULL . CREATE TABLE t1 ( ts1 TIMESTAMP DEFAULT 0, ts2 TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); CREATE TABLE t2 ( ts1 TIMESTAMP NULL, ts2 TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); CREATE TABLE t3 ( ts1 TIMESTAMP NULL DEFAULT 0, ts2 TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);