将 SQL 模式启用为 ALLOW_INVALID_DATES 后,MySQL 还将能够在表中存储无效日期。下面给出了示例来理解它 -
mysql> Insert into order1234(ProductName, Quantity, Orderdate) values('B',500,'2015-11-31');
Query OK, 1 row affected (0.06 sec)
mysql> Select * from order1234;
+-------------+----------+--------------+
| ProductName | Quantity | OrderDate |
+-------------+----------+--------------+
| A | 500 | 0000-00-00 |
| B | 500 | 2015-11-31 |
+-------------+----------+--------------+
2 rows in set (0.00 sec)
我们可以看到 MySQL 也在表中插入了无效日期。