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 packages are available to pl/sql developers?
How do I count rows in sql?
What is exception? What are the types of exceptions?
What is percent sign in sql?
What are sql procedures?
What is sql keyword?
What does subquery mean in sql?
Are stored procedures faster than dynamic sql?
Is a secondary key the same as a foreign key?
Explain autonomous transaction.
Which is faster truncate or drop?
What company owns postgresql?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
What is bitemporal narrowing?
What is compilation error in pl sql?