select * from 表 where (LRSJ-WFSJ)*24 >48如果LRSJ和WFSJ设计时不是日期型,那么需要做一次转换select * from 表 where (to_date(LRSJ,'yyyy-mm-dd hh24:mi:ss')-to_date(WFSJ,'yyyy-mm-dd hh24:mi:ss'))*24 >48
48小时就是2天嘛!所以条件这么写 where time1-time2=2 select * from TIMETEST where time1-time2=2 刚才写的是正好相差48小时的!大于48小时的这样写就行了!select * from TIMETEST where time1-time2<2
时间与时间直接相减 结果是差的天数WFSJ -LRSJ=2*24select (date1 - date2) * 24 from dual;
select * from tab where lrsj>wfsj+48/24