13.2. OVERLAPS Predicate

The OVERLAPS predicate is a feature not yet available in most SQL implementations, because it requires more of the Standard SQL temporal data features than most implementations have. Many programmers have been faking the functionality of the INTERVAL data type with the existing date and time features of their products.

13.2.1. Time Periods and OVERLAPS Predicate

An INTERVAL is a measure of temporal duration, expressed in units such as days, hours, minutes, and so forth. This is how you add or subtract days to or from a date, hours and minutes to or from a time, and so forth. When INTERVALs are more generally available, you will also have an OVERLAPS predicate, which compares two time periods. These time periods are ...

Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.