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 / latha k

declare @N INT
SET @N = 3
SELECT *
FROM [user] AS [user]
WHERE @N = (SELECT COUNT(DISTINCT(user1.Salary))
FROM [user] AS [user1]
WHERE user.Salary <= user1.Salary
)

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3919


What are the requirements for sql server 2016?

932


What are system databases into sql server (2005/2008) : sql server database administration

1053


What are the differences between web role and worker role?

124


why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration

1135


What are sql servers used for?

1112


What is the difference between cartesian product and cross join?

904


How to filter records of table in SQL SERVER?

1132


Explain triggers?

1063


can any body tell me how to know the password of current user in sql server

2119


What do you do in data exploration

1050


Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

938


Difference between uniqe index and uniqe constraint?

1045


Tell me extended events in sql server 2008?

1054


How to check table values in sql server?

1008