开发者

I need an SQL script which would search between time intervals

I need an SQL query that will do the following:

select ..........
from ....
where ....
and arrival_time between systemtime and (systemtim开发者_如何学运维e + 7 hours )


arrival_time BETWEEN current_timestamp AND current_timestamp + INTERVAL '7' hour


You can use tochar function and intervel function to achieve this... like

SELECT ..... FROM WHERE ... and to_char(arrival time,'mm/dd/yyyy hh24:mi:ss') BETWEEN to_char(sysdate,'mm/dd/yyyy hh24:mi:ss') AND to_char(sysdate + interval '7' HOUR,'mm/dd/yyyy hh24:mi:ss').

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜