Chapter 13. BETWEEN and OVERLAPS Predicates

THE BETWEEN AND OVERLAPS predicates both offer a shorthand way of showing that one value lies within a range defined by two other values. The BETWEEN predicate works with scalar range limits; the OVERLAPS predicate looks at two time periods (defined either by start and end points or by a starting time and an INTERVAL) to see if they overlap in time.

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.