Write a query to find the employees who are working in the company for the past Nth years.

Write a query to find the employees who are working in the company for the past Nth years.



Answer:

We can achieve this using the ADD_MONTHS function in Oracle.

select * from emp where hiredate < add_months(sysdate,-60);

Post a Comment

0 Comments