from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / smitha
2nd Highest Salary
Select top 1 salary from (select distinct top 2 salary
from employee order by salary desc)a
order by salary
2nd Least Salary
Select top 1 salary from (select distinct top 2 salary
from employee order by salary asc)a
order by salary desc
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
what are the critical issues you have resloved in your company
What do you mean by an execution plan? Why is it used?
What are various aggregate functions that are available?
What is the purpose of optimization?
System variable and temporary variables
explain the storage models of olap? : Sql server database administration
How do you delete duplicate records in sql server?
What is an execution plan?
Can we add an identity column to decimal datatype?
Tell me what are cursors and when they are useful?
How optimize sql query with multiple joins in sql server?
What are different types of statement?
What is the advantage of sql server?
How will you make an attribute not process? : sql server analysis services, ssas
What are the main differences between #temp tables and @table variables and which one is preferred?