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 the differences between binary and varbinary? : Sql dba
What are sql constraints?
Name some usages of database trigger?
Which sql statement is used to delete data from a database?
What does select count (*) mean in sql?
How do I run a script in sql developer?
Do we need to rebuild index after truncate?
How to change the order of columns in Oracle SQL Plus ?
Is oracel sql developer written in java?
What is sql engine in oracle?
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
What does <> sql mean?
Does sql*plus also have a pl/sql engine?
What is the difference between joins?
What is the use of stored procedures?