📌  相关文章
📜  'post_date' 的默认值无效忽略此错误 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:24.746000             🧑  作者: Mango

代码示例1
if you generated the script from the MySQL workbench.

    The following line is generated
    
    SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
    Remove TRADITIONAL from the SQL_MODE, and then the script should work fine

Else, you could set the SQL_MODE as Allow Invalid Dates
    
    SET SQL_MODE='ALLOW_INVALID_DATES';
    
reference :
https://stackoverflow.com/questions/9192027/invalid-default-value-for-create-date-timestamp-field