how to find nth highest salary

Answer Posted / satesh naidu

select * from emp e1 where &n=(select count(distinct
(e2.sal) from emp e2 where e.sal>e1.sal)

Hai friends try this.u will get nth highest 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 read committed?

686


Explain the purpose of indexes?

624


How can I check if a view exists in a sql server database?

654


How to add a new dsn with the odbc driver for sql server?

644


You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?

630






Mention a few common trace flags used with sql server?

616


What are the steps to follow to configure SQL*Net?

654


What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security

631


Explain what is row_number function?

652


Difference between Inner vs outer joins?

607


how would you store your query in an SSRS report or a Database server?

134


What do you understand by intent locks?

662


What are the reporting services components?

100


what is a self join? Explain it with an example? : Sql server database administration

575


What does ss stand for sexually?

682