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
What is cartesian join in sql?
What are the different dml commands in sql?
What are keys in sql?
what is a foreign key ? : Sql dba
Can we perform dml on view?
What is sql injection owasp?
What are schema-level triggers?
What is a common use of group by in sql?
How does sql developer connect to oracle database?
What does the argument [or replace] do?
What is java sql package?
Is sql microsoft?
how is myisam table stored? : Sql dba
Is nosql faster than sql?
How does cross join work?