mysql allow invalid dates on select

后端 未结 2 2070
陌清茗
陌清茗 2021-02-14 22:53

For some reason, I can\'t even select invalid dates in my table. How do I force select? I just receive:

select * from table
>> Mysql2::Error: Invalid date:         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-14 23:35

    This is what I do to ignore invalid dates:

    SET SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
    

提交回复
热议问题