Синтаксис литерала интервала
Следующий синтаксис используется для литерала интервалов в ODBC.
interval-литерал ::= INTERVAL [+|-] interval-string interval-qualifier
interval-string ::= quote { year-month-literal day-time-literal | } quote
year-month-literal ::= year-value | [значение года -] месяц-значение
day-time-literal ::= day-time-interval-time-interval-interval |
day-time-interval ::= days-value [hours-value [:minutes-value[:seconds-value]]
интервал времени ::= hours-value [:minutes-value [:seconds-value ]
| minutes-value [:seconds-value ]
| значение секунд
years-value ::= datetime-value
months-value ::= datetime-value
days-value ::= datetime-value
hours-value ::= datetime-value
minutes-value ::= datetime-value
значение секунд ::= секунды-целочисленное значение [.[доля секунд] ]
seconds-integer-value ::= unsigned-integer
секунды дроби ::= unsigned-integer
datetime-value ::= unsigned-integer
interval-qualifier ::= start-field TO end-field | single-datetime-field
start-field ::= non-second-datetime-field [(interval-leading-field-precision)]
end-field ::= non-second-datetime-field | SECOND[(interval-fractional-seconds-precision)]
single-datetime-field ::= non-second-datetime-field [(interval-leading-field-precision)] | SECOND[(interval-leading-field-precision [, (interval-fractional-seconds-precision)]
datetime-field ::= non-second-datetime-field | ВТОРОЙ
non-second-datetime-field ::= YEAR | MONTH | DAY | ЧАС | МИНУТУ
interval-fractional-seconds-precision := unsigned-integer
interval-leading-field-precision ::= unsigned-integer
цитата ::= '
unsigned-integer ::= digit...