从Oracle数据库中查询与某一时间点最接近的记录

select * from data_taskregionschedule WHERE regioncode='HYL' and  

updatetime-to_date('2018-05-15','yyyy-mm-dd')=
(select min(updatetime-to_date('2018-05-15','yyyy-mm-dd')) from

data_taskregionschedule where REGIONCODE='HYL' AND updatetime>to_date

('2018-05-15','yyyy-mm-dd'));

猜你喜欢

转载自www.cnblogs.com/xiaoyuersdch/p/9045534.html
今日推荐