select count(1) from record,timing where date_record between start_date and end_date group by run_month;SELECT FROM test1 t WHERE to_char(tbirthday,'YYYY/MM/DD') = '2016/03/11'
其中,birthday是test1表中的日期字段,将日期字段转换格式,与你传入的字符格式一致即可查询。简单号,ROACEL里查询日期带时间的是
to_date('20100201 00:00:00','YYYYMMDD hh24:mi:ss')这样的。
你的语句可以改成
select MOBILE
from local_member
where ( (FIRSTLOGINTIME between to_date('20100201 00:00:00','yyyymmdd hh24:mi:ss') and to_date('20100228 23:59:59','yyyymmdd hh24:mi:ss')) and ( lASTLOGINTIME between to_date('20100201 00:00:00','yyyymmdd hh24:mi:ss') and to_date('20100228 23:59:59','yyyymmdd hh24:mi:ss')))select ename,to_char(Sysdate-hiredate,'yyyy"年"mm"月"dd"日"') from emp;
工作年限
select ename,round(to_char(sysdate-hiredate)) as day from emp;
工作天数
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)