sql 处理时间
<!--sqlserver dateadd convert getdate 配合获取今天的凌晨零点和下一天的凌晨零点-->
<!--orcale trunc sysdate 配合获取今天的凌晨零点和下一天的凌晨零点-->
oracle
SELECT * FROM V_SSAP SSAP,V_MOB_HIS_BRRY BRRY WHERE SSAP.ZYH=BRRY.ZYH AND BRRY.CYPB = 0 AND BRRY.JGID =1
AND SSAP.APRQ >= to_date(trunc(to_date('2017-05-16 15:25:55','yyyy-mm-dd hh24:mi:ss')+0))
AND SSAP.APRQ < to_date(trunc(to_date('2017-05-16 15:25:55','yyyy-mm-dd hh24:mi:ss')+1))
select trunc(sysdate+0) from V_SSAP;
select trunc(sysdate+1) from V_SSAP;
select trunc(to_date('2017-05-15 15:25:55','yyyy-mm-dd hh24:mi:ss')+0) from V_SSAP;
select trunc(to_date('2017-05-15 15:25:55','yyyy-mm-dd hh24:mi:ss')+1) from V_SSAP;
sqlserver
SELECT * FROM V_SSAP SSAP,V_MOB_HIS_BRRY BRRY WHERE SSAP.ZYH=BRRY.ZYH AND BRRY.CYPB = 0 AND BRRY.