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

Why do we use set serveroutput on?

603


what is sub-query? : Transact sql

701


differentiate between float and double. : Sql dba

641


how to convert character strings to numeric values? : Sql dba

674


Can a foreign key have a different name?

612






Can we use insert statement in function?

617


What is the difference between database trigger and stored procedure?

632


When you have to use a default "rollback to" savepoint of plvlog?

810


What is the most restrictive isolation level? : Transact sql

661


Name the operator which is used in the query for pattern matching?

592


Can 2 queries be executed simultaneously in a distributed database system?

747


What is pivot table in sql?

623


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

710


How do we accept inputs from user during runtime?

633


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

906