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'并且会报错...
宛如智障,暗藏锋芒
原文地址:https://www.cnblogs.com/zienzir/p/9049359.html