Interval Data Types

Using the interval data types you can define time periods which are especially useful for datetime arithmetic.

Exasol Type (ANSI type) Range Note
INTERVAL YEAR [(p)] TO MONTH

'-999999999-11' to '999999999-11'

For example: '5-3'

1 ≤ p ≤ 9 (default: 2)
INTERVAL DAY [(p)] TO SECOND [(fp)]

'-999999999 23:59:59.999' to '999999999 23:59:59.999'

For example: '2 12:50:10.123'

1 ≤ p ≤ 9 (default: 2), 0 ≤ fp ≤ 9 (default: 3)

The accuracy is limited to milliseconds