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 nth highest salary

Answer Posted / usha

SELECT EmpName, Salary
from
(
SELECT EmpName, Salary, Row_Number() OVER(ORDER BY SALARY
DESC) AS 'Salaries'
FROM #Employees
) emp
WHERE Salaries = n

n may be 2,3....

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 log cache in sql server?

1100


What stored procedure would you use to view lock information?

1019


Mention the differences between substr and charindex in sql server.

1117


What are the differences between sql server and mysql.

1146


Explain error and transaction handling in sql server?

1064


What is a schema in ms sql server 2005?

1027


What is difference between rownum and rowid?

958


What are distributed partitioned views?

1137


What is lookup override?

1082


What is database architecture? : SQL Server Architecture

1101


Explain differentiate between a having clause and a where clause?

954


Does the order of columns in update statements matter?

957


Describe in brief system database.

1076


Does an index slow down updates on indexed columns?

1038


What is Federation and Federation Member?

94