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
How many types of functions are there in sql?
What is trigger in pl sql?
how would concatenate strings in mysql? : Sql dba
what is the difference between char_length and length? : Sql dba
Explain what is sql?
Can we commit inside a trigger?
How many sql databases can you have on one server?
define sql delete statement ? : Sql dba
Is truncate ddl or dml?
what is user defined functions? : Sql dba
What is procedure function?
Why truncate is faster than delete?
What are the packages in pl sql?
What is trigger in sql? Explain
How is data stored in sql?