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

select * from af where months_between(sysdate,hiredate)<=2

Is This Answer Correct ?    16 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is pl sql a scripting language?

577


Is null operator in sql?

596


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

539


How do I enable sql encryption?

516


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

1550






How to assign sql query results to pl sql variables?

504


how many ways we can we find the current date using mysql? : Sql dba

605


How to run pl sql program in mysql?

505


discuss about myisam key cache. : Sql dba

558


what is the difference between truncate and drop statements? : Sql dba

546


Can we join more than 2 tables in sql?

483


How many aggregate functions are available there in sql?

521


how to create a new table by selecting rows from another table in mysql? : Sql dba

551


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

592


Why do we use joins in sql?

496