在此查询中:
Select * from table where future_date - CURRENT_DATE <= '10';
它返回10天或更短的间隔。
如何添加两个参数?例子:
Select * from table where future_date - CURRENT_DATE <= '10' AND >= '30';
我已经尝试过:
Select * from table where future_date - CURRENT_DATE BETWEEN '10' AND '30'
但这是行不通的。
SELECT * FROM mytable WHERE future_date BETWEEN CURRENT_DATE + '10 days'::INTERVAL AND CURRENT_DATE + '30 days'::INTERVAL