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
What Are the Main Features of SQL Azure?
What are indexers?
What is difference between line feed ( ) and carriage return ( )?
can we have a nested transaction? : Sql server database administration
what's new in sql server 2016?
Which are the third-party tools used in sql server and why would you use them?
how many triggers you can have on a table? : Sql server database administration
You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?
What is difference between aggregate and analytic function?
Can a cursor be updated? If yes, how you can protect which columns are updated?
how would you troubleshoot blocking? : Sql server database administration
What is a natural primary key?
what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration
What is the difference between migration and upgradation in sql server?
When a primary key constraint is included in a table, what other constraints does this imply?