how to find nth highest salary

Answer Posted / sharmila shree

SELECT TOP 1 salary FROM
( SELECT DISTINCT TOP 1 salary FROM table_name
ORDER BY salary DESC )
a ORDER BY salary

here 'a' is sub query of salary

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 clustered primary key?

552


What is difference between foreign key and unique key?

548


How to remove duplicate rows from table?

601


What is data source view or dsv? : sql server analysis services, ssas

554


What is bit data type? What's the information that can be stored inside a bit column?

520






Where are SQL server users names and passwords are stored in sql server?

714


Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?

514


What is difference between oltp and olap?

579


What happens if null values are involved in bitwise operations?

605


What is shrink log file?

513


Explain the properties of a relational table?

561


Explain transaction server consistency?

526


What is self join in sql server joins?

560


What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration

590


What does the update command do?

615