Invalid default value for 'create_date' timestamp field

后端 未结 16 1546
我寻月下人不归
我寻月下人不归 2020-11-30 16:49

I have the following sql create statement

mysql> CREATE  TABLE IF NOT EXISTS `erp`.`je_menus` (
    ->   `id` INT(11) NOT NULL AUTO_INCREMENT ,
    -&g         


        
16条回答
  •  情深已故
    2020-11-30 17:09

    You could just change this:

    `create_date` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
    

    To something like this:

    `create_date` TIMESTAMP NOT NULL DEFAULT '2018-04-01 12:00:00',
    

提交回复
热议问题