I want to display the employees who have joined in last two
months. (It should be executed randomly means If I execute
the query in March it should display Jan and Feb joined
employees. Same query if i execute in Feb, 2007 it should
display dec, 2006 and jan 2007 joined employees.

Answer Posted / sdp

select * from emp
where trunc(months_between(sysdate, hiredate))=2;

Is This Answer Correct ?    39 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the reports view in oracle sql developer?

648


what is the difference between join and union? : Sql dba

636


What is the difference between cross join and natural join?

657


Which command is used to delete a trigger?

877


Is null operator in sql?

698






How can a function retun more than one value in oracle with proper example?

682


What is sqlcontext?

627


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

1802


How to get unique records from a table?

600


What is memory optimized table?

662


Is sql pronounced sequel or sql?

850


What is row_number () in sql?

630


What are its different types of dbms?

624


What does subquery mean in sql?

625


Is oracel sql developer written in java?

750