Home >Database >Mysql Tutorial >How to add a 3 month gap in a MySQL date without using the word 'month' with the gap?

How to add a 3 month gap in a MySQL date without using the word 'month' with the gap?

WBOY
WBOYforward
2023-08-24 17:29:07616browse

如何在不使用带有间隔的“月份”一词的情况下在 MySQL 日期中添加 3 个月的间隔?

is possible with the help of keyword Quarter as follows -

mysql> Select '2017-06-20' + INTERVAL 1 Quarter AS 'After 3 Months Interval';

+-------------------------+
| After 3 Months Interval |
+-------------------------+
| 2017-09-20              |
+-------------------------+
1 row in set (0.00 sec)

The above is the detailed content of How to add a 3 month gap in a MySQL date without using the word 'month' with the gap?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete