Example 5.14.10 To compute the number of months an employee has worked
we can use the function month between. This will compute the number of
months between the current date (designated by the system-provided constant
SYSDATE) and the date of hire:
select empno, months_between(SYSDATE,appt_date)
as month_served
from emphist
The table returned by this query is:
EMPNO MONTH_SERVED
---------- ------------