Datetime Interval Literals
{INTERVAL sign interval-string interval-qualifier}
All interval literals begin with the word “INTERVAL”. This keyword, along with
the opening brace, is sufficient to indicate that it is an interval literal.
For information about the syntax of interval literals, see “Interval Literals” in Appendix D, “Data Types.” For more information on the interval escape
sequence, see “Interval Escape Sequences” in Appendix C, “SQL Grammar.”
To determine if a driver supports the ODBC escape sequences for interval
literals, an application calls SQLGetTypeInfo. If the data source supports a datetime interval data type, it must also
support the corresponding escape sequence.
Data sources can also support the datetime literals defined in the ANSI SQL92
specification, which are different from the ODBC escape sequences for datetime
interval literals. To determine if a data source supports the ANSI literals, an
application calls SQLGetInfo with the SQL_ANSI_SQL_DATETIME_LITERALS option.