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 / aditya kumar bisoi

SELECT EmpId,Salary
FROM(SELECT ROW_NUMBER() OVER(ORDER BY Salary Desc) AS [ROW_NUMBER],* FROM (SELECT DISTINCT Salary,Empid FROM EMPDetails)Emp)Emp1
WHERE ROW_NUMBER BETWEEN 2 AND 5

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is “asynchronous” communication in sql server service broker?

986


Should you normalize audio?

906


How to get a list all databases on the sql server?

1040


what is database replication? : Sql server database administration

1010


What is a dataset and what are the different types of datasets?

131


Are all views updatable ?

1119


Is null vs coalesce?

837


What is the Control Flow in SSIS

1051


What are temporal tables in sql server 2016?

851


How to create function with parameter in sql server?

1058


How to compare the top two records using sql?

1300


What are the reporting services components?

136


What is linked report?

125


what protocol both networks use? : Sql server database administration

944


what are different types of backups available in sql server? : Sql server database administration

906