MySQL查询练习3

mysql> select * from article;
+--------------------+---------------------+
| title              | create_date         |
+--------------------+---------------------+
| 床前明月光         | 2000-01-09 20:20:20 |
| 疑是地上霜         | 2010-11-11 12:12:12 |
| 举头望明月         | 2019-06-06 00:00:00 |
| 低头思故乡         | 2019-07-07 07:07:07 |
| 今天天气好         | 2019-12-12 23:23:59 |
| 明天天气不好       | 2019-10-10 10:10:10 |
| 拜拜               | 2019-11-10 16:02:59 |
| 再见               | 2019-11-10 16:02:00 |
| NULL               | 2019-08-07 06:09:59 |
| NULL               | 2010-11-11 11:11:11 |
+--------------------+---------------------+
10 rows in set (0.00 sec)

mysql> select * from article where title is null or create_date > '20190101000000';
+--------------------+---------------------+
| title              | create_date         |
+--------------------+---------------------+
| 举头望明月         | 2019-06-06 00:00:00 |
| 低头思故乡         | 2019-07-07 07:07:07 |
| 今天天气好         | 2019-12-12 23:23:59 |
| 明天天气不好       | 2019-10-10 10:10:10 |
| 拜拜               | 2019-11-10 16:02:59 |
| 再见               | 2019-11-10 16:02:00 |
| NULL               | 2019-08-07 06:09:59 |
| NULL               | 2010-11-11 11:11:11 |
+--------------------+---------------------+
8 rows in set (0.00 sec)

你可能感兴趣的:(MySQL查询练习3)