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

What is difference between pl and sql?

1111


What is the difference between nvl function, ifnull function, and isnull function?

1154


What are the basic sql commands?

1142


Is sql a dbms?

1062


how to analyze tables with 'mysqlcheck'? : Sql dba

1061


What is cost in sql execution plan?

1045


Is it possible to create the following trigger: before or after update trigger for each row?

1353


Why do we use triggers?

1017


How to write pl sql program in mysql command prompt?

1165


How do I find duplicates in two columns?

1264


How can you get sql*loader to commit only at the end of the load file? : aql loader

1060


what is the difference difference between procedure and packages

10544


What are the advantages of sql?

1100


What is coalesce sql?

1056


Can we use delete in merge statement?

1100