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
Can we insert delete data in view?
How to avoid duplicate records in a query?
What is pl sql script?
What is indexing in sql and its types?
What is difference between pls_integer and integer?
Can we delete column in sql?
Can we create table inside stored procedure?
How to combine two stored procedures in sql?
How long it takes to learn pl sql?
Which are sql * plus commands?
What are the types of dbms?
define data blocks ? : Sql dba
Which join condition can be specified using on clause?
How many sql statements are used?
What is pl sql in dbms?