开发者

I need an SQL script which would search between time intervals

开发者 https://www.devze.com 2023-02-02 16:01 出处:网络
I need an SQL query that will do the following: select .......... from .... where .... and arrival_time between systemtime and (systemtim开发者_如何学运维e + 7 hours )

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

精彩评论

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