您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Oracle取某时间段的数据

2024/3/28 13:55:13发布8次查看
oracle取某时间段的数据: sysdate+1是加一天,sysdate+/-(1/48)就是加/减 半个小时 select count(*) from table_name wher
oracle取某时间段的数据:
sysdate+1是加一天,sysdate+/-(1/48)就是加/减 半个小时
select count(*) from table_name where table_name.date between to_char(sysdate-1/48,'yyyymmdd hh:mi') and sysdate
其中date为你要统计的字段名字
table_name为表的名字
to_char是一个日期函数 to_char(sysdate,'yyyymmdd hh:mi') 为截取到分钟,对应的to_char(sysdate,'yyyymmdd hh')为截取到小时。to_char(sysdate,'yyyymm')为截取到月份,

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product