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
How do I create a stored procedure in dbml?
What are the different types of normalization?
How to create a view and a stored procedure in ms sql server using "create view/procedure" statements?
How to delete duplicate rows in sql server?
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
What is the difference between ddl and dml?
What is shared lock?
Can we take the full database backup in log shipping?
what is a live lock? : Sql server database administration
How to see existing views in ms sql server?
How can delete duplicate records in cte in sql server?
How to verify the port number of the sql server?
what is dbcc? : Sql server database administration
Do you know what is rank function?
Can we use where clause with group by?