SELECT ename, hiredate, trunc(MONTHS_BETWEEN(SYSDATE,hiredate) /12) year , trunc(MOD(MONTHS_BETWEEN(SYSDATE,hiredate) , 12 ) ) months , trunc(SYSDATE - ADD_MONTHS(hiredate,months_between(sysdate,hiredate))) day FROM emp ;
转载于:https://www.cnblogs.com/arkia123/archive/2012/10/23/2734804.html