Invalid default value for 'create_date' timestamp field

后端 未结 16 1552
我寻月下人不归
我寻月下人不归 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:13

    I had a similar issue with MySQL 5.7 with the following code:

    `update_date` TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP

    I fixed by using this instead:

    `update_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP

提交回复
热议问题