SAND CDBMS SQL Reference Guide
Date/Time Arithmetic

 

Previous Topic:
Interval Aggregation
Chapter Index
Next Topic:
Implicit Casting

 

Interval Comparisons

Intervals can be compared to intervals of the same type using any of the following comparison operators: =, <, >, >=, <=, <>. When such a comparison is made, the expression evaluates to a Boolean value (TRUE or FALSE).


Examples

x=3
y=1

Expression Result
x SECONDS <= y SECONDS FALSE
x HOURS <> y HOURS TRUE
y DAYS < x DAYS TRUE