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

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

553


What is the cli? Is it the same as the clr?

601


What are relation objects in dataset?

636


How is the using() pattern useful? What is idisposable?

594


how to set the startup position of the form?

1595






Explain write back and write through caches? : Dot net architecture

648


State the different levels of exceptional safety?

657


What is the mesi? : .NET Architecture

692


data types used in validation control

1820


Explain what does the term "green architecture" mean? : Dot net architecture

650


What are .net mobile controls features? : Microsoft dot net mobile

580


Explain difference between state server and sqlserver? : .NET Architecture

611


Explain hard disk and what is its purpose? : Dot net architecture

601


What is .net mobile input validation. : Microsoft dot net mobile

614


Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure on hardware that converts the ascii value to binary? : .NET Architecture

541