skip to main content
Product overview : OpenAccess SDK configurations and IP implementation : Interval literal
 

Interval literal

Interval literal strings can be used in SQL query to manipulate Date/Time/Timestamp values. Interval literal strings can be used in date-time expression to:
add an interval to a datetime (or add a datetime to an interval)
subtract an interval from a datetime
Example queries of date-time expressions with Interval literals:
SELECT * FROM archive WHERE time BETWEEN now() – {INTERVAL '1' DAY} AND now();
SELECT * FROM emp WHERE hiredate BETWEEN (now()) – (interval '1' day) AND now();