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

select * from emp where
round(months_between(sysdate,hire_date) in(1,2);

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is before and after trigger?

507


what is the difference between blob and text? : Sql dba

517


What is tuple in sql?

535


Explain normalization and what are the advantages of it?

512


What are different categories of sql commands?

625






Can we create table in function?

558


what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba

535


Can we rollback delete command?

503


Is null operator in sql?

594


What are stored procedures used for?

528


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

523


explain advantages of innodb over myisam. : Sql dba

632


How to run sql functions in pl/sql?

531


What is pl sql collection?

514


List the various privileges that a user can grant to another user?

564