Date functions

How to know the days or months or years between two employees in emp table.

Questions by jbabu   answers by jbabu

Showing Answers 1 - 1 of 1 Answers

select hiredate,lead(hiredate,1) over(order by hiredate) next_months, round(months_between(lead(hiredate,1) over(order by hiredate),hiredate),3) months from emp;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions