BETWEEN in MySQL — How It Works
What the MySQL BETWEEN function does, with an example.
Published October 23, 2026
BETWEEN tests whether a value falls within an inclusive range.
Key points
- Part of standard SQL functions available in MySQL for working with query results
Example
SELECT * FROM orders WHERE created_at BETWEEN '2024-01-01' AND '2024-12-31';