MySQL Incorrect datetime value: '0000-00-00 00:00:00'

后端 未结 19 1002
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 15:51

I\'ve recently taken over an old project that was created 10 years ago. It uses MySQL 5.1.

Among other things, I need to change the default character set from latin1

19条回答
  •  無奈伤痛
    2020-11-29 16:32

    SET sql_mode = 'NO_ZERO_DATE';
    UPDATE `news` SET `d_stop`='2038-01-01 00:00:00' WHERE `d_stop`='0000-00-00 00:00:00'
    

提交回复
热议问题