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
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
What is the purpose of object explorer and its features? : sql server management studio
What do you understand by SQL*Net?
Can a table be created inside a trigger?
Is resultset an interface?
Please explain go command in sql server?
Which tools are available to manage SQL Azure databases and servers?
How you can get the list of largest tables in a database?
How does Report Builder support Analysis Services cubes?
What are acid properties of transaction?
How much does sql server 2016 cost?
You want to implement the many-to-many relationship while designing tables. How would you do it?
Differentiate between a having clause and a where clause.
What is the use of stored procedure?
How to modify an existing stored procedure in ms sql server?