please tell me the query to get details of the employee
having the second largest salary
Answer Posted / roshan
select employeeid, employeeName ,Salary from table1 where
Salary =(select min(a.Salary) from table1 inner join
(select top 2 Salary from table1
order by Salary desc) a on table1.Salary = a.Salary)
if we change the top value we will get the n'th largest
salary
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the indexes in sql server?
What is the stuff and how does it differ from the replace function?
List the different normalization forms?
Why do we need different type of parameter?
What are the restrictions that views have to follow?
How except clause is differs from not in clause?
Can I disable or restrict ssrs export formats (rendering formats)?
What is spid in sql server profiler?
explain the storage models of olap? : Sql server database administration
What are the advantages of sql stored procedure?
How to invoke a trigger on demand?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
Explain sql server authentication modes?
Why are sql functions used?
Which rendering formats are affected by the pagesize properties?