现要做报表,要查出在当天所处的日期区间的某些数据
,sql语句该怎么写?
就是说 无法直接输入日期,日期得在其他表的start date 和 end date 中获得。 select * from a where a.time between (select b.startdate from b b where sysdate between startdate and enddate) and (select b.enddate from b b where sysdate between startdate and enddate);
时间: 2024-10-24 11:29:44