how to find nth highest salary

Answer Posted / brahma

select * from table_name t1 where (n-1)=
(select count(distinct(column_name)) from table_name t2
where t2.column_name>t1.column_name)

Is This Answer Correct ?    101 Yes 47 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where is localdb stored?

731


How to find the source of a table in sql server?

709


Do you know what are the reporting services components?

708


Can a unique index be created on a column, which contains null?

713


What is the difference between implicit and explicit transaction?

732






Explain the various types of concurrency problem?

923


How to run sql server 2005 books online on your local system?

713


How do clustered indexes store data?

798


what is denormalization? : Sql server database administration

654


What is the function of inner join?

752


What is a with(nolock)?

753


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

938


You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?

134


What is save transaction and save point?

838


What is the recursive stored procedure in sql server?

708