how to find the 2nd higgest salary in the column for example
take table name is employee?
And also find bottom 2nd lowest salary ?
Answer Posted / sudhir
1. 2nd highest salary=>
Select top 1 * from (select top 2 * from emo order by sal
desc) order by sal asc
2. 2nd lowest salary
Select top 1 * from (select top 2 * from emo order by sal
Asc) order by sal Desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What happens when you try to update data in a dataset in .net while the record is already deleted in sql server as backend?
What is a managed code? : Dot net architecture
Are there any third party logging components available?
Whate are resource files? How are they used in .net?
Explain the Lapsed Listener problem in .net
Xmlserializer is throwing a generic "there was an error reflecting myclass" error. How do I find out what the problem is?
What is biginteger and when would you use that?
Define cache coherency and how is it eliminated? : Dot net architecture
Explain how does .net mobile work? : Microsoft dot net mobile
What is MS chart control in visual studio?
Can you explain server controls in atlas?
What does the term "green architecture" mean? : Dot net architecture
How does .net mobile work? : Microsoft dot net mobile
what is the difference between master page and content page?
How is the using() pattern useful? What is idisposable?