Range Queries with BETWEEN
BETWEEN filters values within a range (inclusive).
This is the same as:
WHERE salary >= 70000 AND salary <= 90000BETWEEN works with:
- Numbers
- Dates
- Text (alphabetically)
Both endpoints are included!
Check your understanding
Find employees earning between $75,000 and $95,000.
Examples run on the employees sample database. Open any of them in the playground to experiment.