how to find nth highest salary

Answer Posted / balindra sahani

select max(salary) from table_name where max(salary)not
in(select top(n) from table_name order by salary asc)

where n=nth number salary

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql azure database?

188


Explain what is use of dbcc commands?

510


what is a sub-report?

96


What is tempdb in sql server?

517


What is #temp and @table variable in SQL server?

583






How do I partition a table in sql server?

539


Explain nested trigger in sql?

591


What is single-user mode and what are the steps you should follow to start sql server in single-user mode?

555


What is index fragmentation in ms sql server?

602


What is Command line parameters in PLSQL.?

582


What is join query?

498


What does executeupdate return?

539


How can I change procedure name in sql server?

540


What is the impact on other user sessions when creating indexes?

541


What is log ldf?

555