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 / raji_4u
select *
from emp
where hiredate
between add_months(trunc(sysdate,'Month'),-2)
and trunc(sysdate,'Month')-1
This works for sure. 100 %
| Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
How many commands are there in sql?
What is Histogram?
What is t-sql? : Transact sql
How bulk collect improves performance?
What are pl sql data types?
What is date functions?
What is 19 null in sql?
What is sql key?
What is a sql driver?
what is the bond code in materialized view?
What are the different types of joins in sql?
What is the use of %rowtype?
Is clustered index a primary key?
What are the 3 types of behavioral triggers?
What is loop in pl sql?