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

Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

640


what is the primary use of the model database? : Sql server administration

504


What do you understand by the data quality services in sql server?

499


What extended events?

550


What is a fan-out query in SQL Azure?

99






What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration

608


Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?

546


Explain the steps needed to create a scheduled job?

525


How real and float literal values are rounded?

588


Explain boyce and codd normal form(bcnf)?

535


How to disconnect from a sql server using mssql_close()?

591


What are the hotfixes and patches in sql server?

547


How to handle error or exception in sql?

532


Why are sql functions used?

622


What is an indexed view?

583