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 / pankaj kumar

if am not wrong we can also do the same thing by using aggreate function like Min or Max..

Like if i want to know 4th Highest Salary then i can

SELECT MIN(Sal) FROM TableName
WHERE Sal IN
(SELECT TOP 4 Sal FROM TableName ORDER BY Sal DESC)

Regards
Pankaj Kumar
pankaj.arrah@gmail.com

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name some changes done since version 3.0?

558


Explain what does the term "green architecture" mean? : .NET Architecture

520


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

507


What's the difference between an application and a program?

564


Explain cache memory? : Dot net architecture

538






define cache memory? : Dot net architecture

539


Explain difference between machine config vs. Web config? : .NET Architecture

540


Waht is Dot net Arcitecture

1955


What is the purpose of Treeview control?

553


Define a managed code? : Dot net architecture

510


Explain the race around condition? : Dot net architecture

484


Explain dma? : .NET Architecture

540


How do I write to the application configuration file at runtime?

524


What is the difference between l1 and l2 cache? : Dot net architecture

523


Explain COM with example?

564