从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'));

posted @ 2018-05-16 13:27  就是小鱼儿  阅读(5439)  评论(0编辑  收藏  举报