PostgreSQL

PostgreSQL BETWEEN

Filter values within an inclusive range.

Use BETWEEN

SELECT * FROM products
WHERE year BETWEEN 2024 AND 2026;

BETWEEN includes both boundary values. For dates, use clear date or timestamp literals and consider the time component.