Invalid default value for 'Date'

后端 未结 5 833
太阳男子
太阳男子 2021-01-02 17:56

I want to set date as default value for date in mysql (not timestamp), but the following error appear

ALTER TABLE `RMS`.`transactionentry` 
CHANGE `Date` `Da         


        
5条回答
  •  温柔的废话
    2021-01-02 18:00

    remember it could be an issue with MYSQL version itself 5.6 allows timestamp with out a default value and doesn't requires to set them as null however 5.7 requires you to explicitly set the default if not then nul

提交回复
热议问题