BETWEEN
An operator that tests whether a value lies in a range, including both ends.
In more detail
BETWEEN 1003 AND 1005 includes 1003 and 1005. On dates stored with a time part, an inclusive upper end can quietly leave out most of the last day, so many people prefer >= start AND < next day.
Related terms
- comparison operator — An operator that compares two values and gives true or false, such as equal, not equal, less than or greater than.
- WHERE clause — The part of a query that keeps only the rows for which a condition is true.
Taught in
- Filtering With The WHERE Clause — PostgreSQL, Indexing & Relational Data Modeling