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

select * FROM(SELECT ENAME, Abs(to_date('&DATE' ,'dd/mm/yy')- HIREDATE) AS DATES FRom EMP) where dates<60;

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 a temporal table?

489


what is heap table? : Sql dba

601


What are the differences between implicit and explicit cursors?

513


What type of join is sql join?

526


What are different types of indexes?

508






What are the two types of periodical indexes?

501


What is substitution variable?

573


what is a database? : Sql dba

604


What is primary key and foreign key with example?

494


What is difference between inner join and cross join?

517


what is the difference between union and union all? : Sql dba

542


Where is sql database stored?

514


Which is better varchar or nvarchar?

544


What are keys in sql?

543


Is sql a scripting language?

510