我们可以通过以下方式在日期中添加“半年间隔” -
(A) 通过添加 6 个月的间隔
mysql> Select '2017-06-20' + INTERVAL 6 Month AS 'After Half Year Interval';
+--------------------------+
| After Half Year Interval |
+--------------------------+
| 2017-12-20 |
+--------------------------+
1 row in set (0.00 sec)
(B) 添加 2 个季度的间隔
mysql> Select '2017-06-20' + INTERVAL 2 Quarter AS 'After Half Year Interval';
+--------------------------+
| After Half Year Interval |
+--------------------------+
| 2017-12-20 |
+--------------------------+
1 row in set (0.00 sec)
以上查询将借助 Quarter 关键字在日期中添加半年间隔。