17,377
社区成员
发帖
与我相关
我的任务
分享
-- 最近一天的:直接用 sysdate-1 就OK啦!
-- (即24个小时前,到现在的数据,如果你的时间字段,没有比当前时间还大的数据记录行在在的话)
select * from tab where ts>= sysdate-1;
select *
from (select a.*,row_number over(order by ts desc) rn from tb) where a.rn=1
select * from 表名 where TS between '日期' and '日期'
select * from tab where ts>=trunc(sysdate)-1