4.4.16 Time specification

Organization of this subsection
(1) Format
(2) Function
(3) Operands
(4) Syntax rules
(5) Notes
(6) Usage example

(1) Format

time-specification::={SECOND|MILLISECOND|MINUTE|HOUR|DAY}

(2) Function

Specifies a unit of time.

(3) Operands

SECOND

Specifies seconds as the unit of time.

MILLISECOND

Specifies milliseconds as the unit of time.

MINUTE

Specifies minutes as the unit of time.

HOUR

Specifies hours as the unit of time.

DAY

Specifies days as the unit of time.

(4) Syntax rules

Separately from the time specification, the time value itself is specified as an integer constant. The following table shows the relationship between time specification and integer constants.

Table 4-5 Relationship between time specification and integer constants

No.Time specification (for specifying a time unit)Integer constant (for specifying a time value)
OperandMeaningMinimum valueMaximum value
1SECONDSecond12678400​
2MILLISECONDMillisecond186400000​
3MINUTEMinute144640
4HOURHour1744
5DAYDay131

(5) Notes

(6) Usage example

Specifies that rows remain in the stream in relation s1 for 2 seconds. The underlined part indicates the time specification.

REGISTER QUERY q1 SELECT * FROM s1[RANGE 2 SECOND];