Description\n-----------\n\nThe INTERVAL keyword can be used to add or subtract a time interval of time to a DATETIME, DATE or TIME value.\n\nThe syntax is:\n\n``sql\nINTERVAL time_quantity time_unit\n`\n\nFor example, the SECOND unit is used below by the DATE_ADD() function:\n\n`sql\nSELECT '2008-12-31 23:59:59' + INTERVAL 1 SECOND;\n+-------------------------------------------+\n| '2008-12-31 23:59:59' + INTERVAL 1 SECOND |\n+-------------------------------------------+\n| 2009-01-01 00:00:00                       |\n+-------------------------------------------+\n`\n\nThe following units are valid:\n\n| Unit                | Description                             |\n| ------------------- | --------------------------------------- |\n| MICROSECOND         | Microseconds                            |\n| SECOND              | Seconds                                 |\n| MINUTE              | Minutes                                 |\n| HOUR                | Hours                                   |\n| DAY                 | Days                                    |\n| WEEK                | Weeks                                   |\n| MONTH               | Months                                  |\n| QUARTER             | Quarters                                |\n| YEAR                | Years                                   |\n| SECOND_MICROSECOND | Seconds.Microseconds                    |\n| MINUTE_MICROSECOND | Minutes.Seconds.Microseconds            |\n| MINUTE_SECOND      | Minutes.Seconds                         |\n| HOUR_MICROSECOND   | Hours.Minutes.Seconds.Microseconds      |\n| HOUR_SECOND        | Hours.Minutes.Seconds                   |\n| HOUR_MINUTE        | Hours.Minutes                           |\n| DAY_MICROSECOND    | Days Hours.Minutes.Seconds.Microseconds |\n| DAY_SECOND         | Days Hours.Minutes.Seconds              |\n| DAY_MINUTE         | Days Hours.Minutes                      |\n| DAY_HOUR           | Days Hours                              |\n| YEAR_MONTH         | Years-Months                            |\n\nThe time units containing an underscore are composite; that is, they consist of multiple base time units. For base time units, time_quantity is an integer number. For composite units, the quantity must be expressed as a string with multiple integer numbers separated by any punctuation character.\n\nExample of composite units:\n\n`sql\nINTERVAL '2:2' YEAR_MONTH\nINTERVAL '1:30:30' HOUR_SECOND\nINTERVAL '1!30!30' HOUR_SECOND -- same as above\n`\n\nTime units can be used in the following contexts:\n\n after a + or a - operator;\n with the following DATE or TIME functions: ADDDATE(), SUBDATE(), DATE_ADD(), DATE_SUB(), TIMESTAMPADD(), TIMESTAMPDIFF(), EXTRACT();\n in the ON SCHEDULE clause of CREATE EVENT and ALTER EVENT;\n when defining a partitioning BY SYSTEM_TIME` .\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/date-time-functions/date-and-time-units