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 does pragma mean?

511


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

620


What does cursor do in sql?

520


How do you optimize a stored procedure query?

568


Explain what is table in a database?

582






Why is %isopen always false for an implicit cursor?

570


How many commands are there in sql?

551


What are the three pl sql block types?

573


Can we commit in trigger?

549


What do you mean by stored procedures?

553


What is the difference between view and stored procedure?

498


how to run 'mysql' commands from a batch file? : Sql dba

610


How do I clear the screen in sql plus?

553


what is heap table? : Sql dba

610


Mention what pl/sql package consists of?

539