how to find nth highest salary
Answer Posted / dewashish kumar pal
select salary from tablename t where (n-1)= (select count(*) from tablename where salary > t.salary);
note:- t = tablename
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many types of triggers are there?
Can a stored procedure call itself or recursive stored procedure? How many levels sp nesting is possible?
what's the difference between delete table and truncate table commands? : Sql server database administration
What command would you use to add a column to a table in sql server?
How to use copy and concatenate commands in SQL?
What is a join in sql? What are the types of joins?
Explain the different types of backups available in sql server? : sql server database administration
What are the differences between web role and worker role?
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
How do I create a stored procedure in sql server?
How do I make a resultset scrollable?
What are logical database components? : SQL Server Architecture
What are the main differences between #temp tables and @table variables and which one is preferred?
Suppose you want to implement the one-to-many relationships while designing tables. How would you do it?
How many types of built in functions are there in sql server 2012?