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

Describe how to use the linked server?

1064


what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration

919


What are the types of joins in sql?

1055


Explain trigger and its types?

1012


Where sql server user names and passwords are stored in sql server? : sql server database administration

992


What is the difference between sdf and mdf?

1231


What are sub reports?

186


tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

963


What is sql server profiler?

953


Does union all remove duplicates?

1016


What is a trigger and its types?

926


What does it mean to invest in the index?

905


What the different components in replication and what is their use?

912


What is lookup override?

959


What are synonyms?

913