PostgreSQL BETWEEN

BETWEEN has nothing to say, there are two points worth noting:
1. You can use operators such as >, <, >=, <= to achieve the same effect as BETWEEN and NOT BETWEEN.
2. The format of the comparison date value: ISO 8601 format ie, YYYY-MM-DD.
For example:

SELECT
	customer_id,
	payment_id,
	amount,
 payment_date
FROM
	payment
WHERE
	payment_date BETWEEN '2007-02-07' AND '2007-02-15';

Guess you like

Origin blog.csdn.net/weixin_42072754/article/details/109636161