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

How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database

plz mail the answer @ mak2786@gmail.com

Answer Posted / pankaj arya

select top 1 sal from emp where empid in(select top 2 empid
from emp order by sal desc) order by
sal asc

if you want to get 3rd one than put 'top 3' in subquery and
same for 4th, 5th....

Is This Answer Correct ?    15 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are various ways to enhance the ssrs report?

1097


What is difference between Datepart() and Datename() in SqlServer?

1258


When I run the sql server 2000 setup, it just hangs. What do I do?

1129


How many joins in sql server?

1004


What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.

1331


What is nonclustered index with included columns ?

1016


Explain the concepts and capabilities of sql server?

1014


What is an indexed view?

1007


What is correlated subquery in sql server?

1127


What are the system database in sql server 2005?

1097


How do I run sql server 2014?

1054


What the difference between UNION and UNIONALL?

1089


Explain the steps needed to create a scheduled job?

981


What are Row versions of DataRow?

1082


What are scheduled tasks in sql server?

1141