PostgreSQL SyntaxLesson 28Free preview
PostgreSQL BETWEEN
This lesson is part of PostgreSQL · All levels
Summary
The Between operator checks whether a value is within a range, including both of its limits. Between is always written with AND to separate the lower boundary and the upper boundary. This operator works for numbers, dates, text, and other types of data that can be compared.
Key points
- BETWEEN is inclusive, meaning that both boundaries are checked.
- Always use AND between the lines, not OR.
- It applies to numbers, dates, timestamps, and other types of appeals.
- Make sure the bottom limit is no larger than the top limit.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.