分享方式:


間隔常值語法

下列語法用於 ODBC 中的間隔常值。

interval-literal ::= INTERVAL [+ | -] interval-string interval-qualifier

interval-string ::= quote { year-month-literal day-time-literal | } quote

year-month-literal ::= years-value |[ years-value -] months-value

day-time-literal ::= day-time-interval time-interval |

day-time-interval ::= days-value [hours-value [ minutes-value [: seconds-value ]]

time-interval ::= hours-value [:minutes-value [: seconds-value ] ]

| minutes-value [: seconds-value ]

| seconds-value

years-value ::= datetime-value

month-value ::= datetime-value

days-value ::= datetime-value

hours-value ::= datetime-value

minutes-value ::= datetime-value

seconds-value ::= seconds-integer-value [.[ seconds-fraction ] ]

seconds-integer-value ::= unsigned-integer

seconds-fraction ::= 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 |HOUR |分鐘

interval-fractional-seconds-precision ::= unsigned-integer

interval-leading-field-precision ::= unsigned-integer

quote ::= '

unsigned-integer ::= digit...