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 / venkat

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

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is procedure and function in sql?

530


what are the different type of sql's statements ? : Sql dba

520


how many sql dml commands are supported by 'mysql'? : Sql dba

567


How do you create a unique index?

569


What is offset in sql query?

593






How do I view a sql trace file?

564


explain about mysql and its features. : Sql dba

543


What are the two types of exceptions in pl/sql?

541


what is a control file ? : Sql dba

575


What are the 3 modes of parameter?

675


What are string functions in sql?

674


Explain two easy sql optimizations.

602


Is stored procedure faster than query?

561


What is oracle sql called?

502


Is inner join faster than left join?

629