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 / 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


Please Help Members By Posting Answers For Below Questions

Inline the values in PL/SQL, what does it mean.?

1156


What is benefit of creating memory optimized table?

907


Does pl sql work in mysql?

919


Why should I use postgresql?

970


What are schema-level triggers?

1046


What are the uses of sysdate and user keywords?

1050


how to load data files into tables with 'mysqlimport'? : Sql dba

1032


How many joins can you have in sql?

880


explain the options of myisamchk to improve the performance of a table. : Sql dba

950


What is rename command in sql?

950


How do you optimize a stored procedure in sql?

893


What are pl/sql cursor exceptions?

1036


what is myisam? : Sql dba

1000


what is log shipping? : Sql dba

1056


What is the command used to fetch the first 5 characters of a string?

1150