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 / kesava
100% sure execute
select * from emp
where hiredate between
trunc(add_months(last_day(sysdate),-3)+1) and
trunc(add_months(last_day(sysdate),-1))
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are secondary keys?
what is cursor. write example of it. What are the attributes of cursor.
Which command is used to delete a trigger?
how to present a past time in hours, minutes and seconds? : Sql dba
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
Which table is left in left join?
Why commit is not used in triggers?
What is sequence in sql?
What type of database is sql?
Can you rollback after commit?
How are sql commands classified?
How to call a javascript function from pl sql?
Do we need to rebuild index after truncate?
What is pl sql in oracle?
What are tables in sql?