Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what are the types of subquery? : Sql dba

1116


What is trigger price?

999


What is trigger types of trigger?

1077


How do I create an index in word?

1039


How does a covering index work?

971


What is dense_rank?

940


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

1010


Is sql better than access?

1023


How do I run a sql query?

1031


What is rowid in sql?

993


How many row comparison operators are used while working with a subquery?

1039


What is a left inner join?

1023


what is the difference between undefined value and null value? : Sql dba

1110


What is the usage of when clause in trigger?

1064


What is function and procedure in pl sql?

1057