Ou vous auriez pu faire ceci :
select trunc(sysdate) - to_date('2009-10-01', 'yyyy-mm-dd') from dual
Cela renvoie un NOMBRE de jours entiers :
SQL> create view v as
2 select trunc(sysdate) - to_date('2009-10-01', 'yyyy-mm-dd') diff
3 from dual;
View created.
SQL> select * from v;
DIFF
----------
29
SQL> desc v
Name Null? Type
---------------------- -------- ------------------------
DIFF NUMBER(38)