from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / sridhar sahoo
select distinct top 1 salary from payroll..emp where salary
in(select distinct top N salary from payroll..emp order by
salary desc)
if u want top 2 put 2 at the pacece of N
if u want top 5 put 5 at the pacece of N
if u want ..............................
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can you stop stored procedures from recompiling?
Why is the need for data conversion transformations?
How to sort the query output with order by clauses in ms sql server?
How you can find out if an index is useful to the optimizer?
What is self contained multi valued query?
What are security principals used in sql server 2005?
What is b tree index?
What new data source types were added in ssrs 2014?
What is the difference between for xml raw and for xml auto?
What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?
Can two tables share a primary key?
What is read uncmmited?
Why olap is used?
Explain the difference between clustered and non-clustered index?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation