Oracle怎么写SQL把24小时内的数据取出来,当前时间为系统时间哈,以红色方框的字段来做区分
between sysdate+numtodsinterval(-24,'hour') and sysdate
参考:https://blog.csdn.net/i1103/article/details/122121834
https://zhidao.baidu.com/question/2083980717160194428.html
三天 select * from table where table.time between trunc(sysdate-2) and trunc(sysdate)
两天 select * from table where table.time between trunc(sysdate-1) and trunc(sysdate)
一天 select * from table where table.time = trunc(sysdate)