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 are the different types of constraints?
What makes a good primary key?
What is the primary key?
How many types of primary keys are there?
How do I create a sql database?
what is collation? : Sql dba
Which are the different character-manipulation functions in sql?
How many row comparison operators are used while working with a subquery?
What is attribute indicator in pl sql?
What is cursor explain with example?
What is file based approach?
What is transaction control language (tcl)?
How do you pronounce sql?
What is an example of translating a date into julian format?
how to check myisam tables for errors? : Sql dba