How to display the names of the employees who are working in the company for the past 5 years?

Oracle Apps Interview QuestionsCategory: SQLHow to display the names of the employees who are working in the company for the past 5 years?
Questions Master asked 9 years ago
1 Answers
Shailender Thallam Staff answered 9 years ago

SELECT ename
FROM emp
WHERE TO_CHAR(sysdate,’YYYY’)-TO_CHAR(hiredate,’YYYY’)>=5;