--方法1
select floor((sysdate -
to_date('2006-09-01 08:00:00', 'yyyy-mm-dd hh24:mi:ss'))) as sDays
from dual;
--ceil(n) 取大于等于数值n的最小整数;
--floor(n)取小于等于数值n的最大整数;
select ceil(9.6) from dual; --->10
select floor(9.6) from dual; --->9 --方法2
select ROUND(TO_NUMBER(sysdate - to_date('2006-09-01 08:00:00',
'yyyy-mm-dd hh24:mi:ss'))) as sDays
from dual;