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

Do you know spatial data types - geometry and geography in sql server 2008?

1089


What is a filestream?

1045


Explain full-text query in sql server?

1054


What is subquery explain with example?

1123


How do you delete duplicate records in sql server?

1126


Can a table be created inside a trigger?

1013


What is an index. What are the types?

1161


What is 3nf normalization form?

1168


What are sql server functions?

1028


What is the difference between upgrade and migration in sql server?

1150


Do you know what is fill factor and pad index?

1046


What are sql azure firewall rules?

106


What are the properties of the transaction?

1052


Does any body please help me what question's have asked for SSRS in the interview?

2201


What is the difference between ddl and dml?

1097