--方法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;

 

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-06-24
相关资源
相似解决方案