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 catalog views?

703


Explain full-text query in sql server?

620


What is shared lock?

574


We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?

993


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5586






How can we migrate from SQL server to SQL Azure?

102


What does indexation mean?

601


What are entities and relationships?

640


What is server-level principal?

108


Find nth lowest salary or get nth lowest salary?

680


When multiple after triggers are attached to sql table, how to control the order of execution?

628


How to check if stored procedure is running in sql server?

567


Explain filestream storage of sql server 2008?

598


What is transaction server explicit transaction?

644


What is measure group, measure? : sql server analysis services, ssas

659