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


Please Help Members By Posting Answers For Below Questions

Can I create my own metadata attributes?

535


When do I need to use gc.keepalive?

651


What is Video Streaming in .net??

554


Explain the five stages in a dlx pipeline? : .NET Architecture

508


What is biginteger and when would you use that?

535






Explain the purpose of cache? How is it used? : .NET Architecture

546


What are the different pipelining hazards and how are they eliminated? : Dot net architecture

603


What does this do? Gacutil /l | find /i "corillian"

613


Explain a .net mobile example with details? : Microsoft dot net mobile

478


Explain about common language infrastructure?

566


Explain How to improve the cache performance? : Dot net architecture

522


Explain dma? : .NET Architecture

546


where should I put this information then?

587


How do I prevent concurrent access to my data?

555


What is the difference between an event and a delegate?

525