oracle数据库中 当where日期为变量,请问语句怎么写

2025-03-25 14:28:29
推荐回答(1个)
回答1:

select * from t where time>=to_char(to_date('2015-4-20','yyyy-mm-dd'),'yyyy/mm/dd') and time<=to_char(to_date('2015-4-20','yyyy-mm-dd')+4,'yyyy/mm/dd');

5天内,+4就可以了。