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 sql server means?
Explain about Normalization?
How to Check if table exists in sql server?
Explain what role entity and relationship play in an ER diagram.
What is multi-statement table-value user-defined function?
The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio
Is sql different from sql server?
How to use subqueries with the exists operators in ms sql server?
Which are the new data types introduced in sql server 2008?
How do I find the port number for sql server?
What is a subquery in a select query statement in ms sql server?
Explain indexed views and partitioned view with their syntax.
What is updatable resultset?
Explain temporary table vs table variable by using cursor alternative?
Difference between Sql server reporting services and Crystal reports?