2010-06-28 157 views

回答

6

你可以嘗試以下方法:

SELECT TRUNC(sysdate) - TRUNC(t.hiredate) FROM myTable t; 

這將導致小數來表示的天數。時間戳的TRUNC將確保您將在連續呼叫中獲得一致的結果。

+0

thx,這是正確的答案 – LJme 2010-06-28 02:20:37

5
select round((months_between(sysdate,hiredate) * 30),0) from table