how to find nth highest salary

Answer Posted / affu

select salary from table t where n-1=(select distinct count
(sal) from table t1 where t1.sal>t.sal)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What Are the Main Features of SQL Azure?

95


What are indexers?

631


What is difference between line feed ( ) and carriage return ( )?

528


can we have a nested transaction? : Sql server database administration

508


what's new in sql server 2016?

565






Which are the third-party tools used in sql server and why would you use them?

496


how many triggers you can have on a table? : Sql server database administration

499


You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?

88


What is difference between aggregate and analytic function?

486


Can a cursor be updated? If yes, how you can protect which columns are updated?

523


how would you troubleshoot blocking? : Sql server database administration

524


What is a natural primary key?

527


what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration

510


What is the difference between migration and upgradation in sql server?

610


When a primary key constraint is included in a table, what other constraints does this imply?

603