BETWEEN
Introduction to the PostgreSQL BETWEEN operator
value BETWEEN low AND high;value >= low AND value <= highvalue NOT BETWEEN low AND highvalue < low OR value > highPostgreSQL BETWEEN operator examples
1) Using the PostgreSQL BETWEEN operator with numbers
SELECT
payment_id,
amount
FROM
payment
WHERE
payment_id BETWEEN 17503 AND 17505
ORDER BY
payment_id;2) Using the PostgreSQL NOT BETWEEN example
3) Using the PostgreSQL BETWEEN with a date range

Last updated