How can it be possible to add 3 months interval in a MySQL date without using the word ‘Months’ with interval?

MySQLMySQLi Database

It 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)
raja
Published on 19-Feb-2018 10:39:10
Advertisements