oncik oncik - 4 months ago 30
SQL Question

Count how many month had passed

It goes like

SELECT fname, date_emped
FROM table_1

Then it gave me the table

fname | date_emped
John | 03-JAN-07
Smith | 02-JAN-08

I wanted to count how many months they had employed or worked here up until today.


I am not champ in orcale but this might do

	SELECT fname, date_emped, MONTHS_BETWEEN 
    date_emped) "Months"
FROM   table_1