Invalid default value for 'Date'

后端 未结 5 815
太阳男子
太阳男子 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 17:57

    You can change the column definition with:

    ALTER TABLE transactionentry MODIFY COLUMN `Date` date null;
    

    Allow null works for me.

提交回复
热议问题