I am a Solivagant
Lofter    Posts     新文章     文章管理     新日记     日记管理

Server SQL Modes

The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients. depending on the value of the sql_mode systemn varable. DBAs can set the global SQL mode to match site server operating requirements, and each application can set its session SQL mode to its own requirements. ALLOW_INVALID_DATES Do no tpreform full checking o dates. check only that the month is in the range from 1 to 12 and the day in the range from 1 to 31. THis may be useful for Web application that obntain year,mouth ,and day in three different fields and store exactly what the user inserted , without date validation. This mode applies to DATE and DATETIME clolumns. It does not apply TIMESTAMP clolumns, which always require a valid date. if ALLOW_INVALID_DATES disabled. '2004-4-31' 这种不合理的日期会被转换为'0000-00-00'并且会报错...
posted @ 2018-05-17 09:36  宛如ZZ  阅读(131)  评论(0编辑  收藏  举报