标签:color 数据 div ar 时间 line sql oracle
[sql] --国内从周一到周日 国外是周日到周六 select to_char(sysdate-1,‘D‘) from dual;--取国内的星期几 去掉减一取国外的星期--[sql] --取本周时间内的数据 select * from table where DTIME >=trunc(next_day(sysdate-8,1)+1) and DTIME<=trunc(next_day(sysdate-8,1)+7)+1 ; select * from table where DTIME >=trunc(next_day(sysdate-8,1)) and DTIME<=trunc(next_day(sysdate-8,1)+7);--国外的 select * from table where DTIME >=TRUNC(SYSDATE, ‘MM‘) and DTIME<=last_day(SYSDATE); --本月的 select * from table where to_char(DTIEM,‘yyyy‘)=to_char(sysdate,‘yyyy‘); --本年的
oracle sql语句取得本周本月本年的数据,布布扣,bubuko.com
标签:color 数据 div ar 时间 line sql oracle
原文地址:http://www.cnblogs.com/xiaobaitu/p/3873348.html