how to find the 2nd higgest salary in the column for example
take table name is employee?
And also find bottom 2nd lowest salary ?

Answers were Sorted based on User's Feedback



how to find the 2nd higgest salary in the column for example take table name is employee? And also..

Answer / prasoon madnawat

SQL Server:
Select MIN(Salery) from (SELECT TOP 2 * from EMPLOYEE)

Oracle:
Select MIN(Salery) from (SELECT * from EMPLOYEE where ROWNUM <3)

MySQL
Select MIN(Salery) from (SELECT * from EMPLOYEE LIMIT 2)

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Dot Net AllOther Interview Questions

Explain dma? : Dot net architecture

0 Answers  


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

0 Answers  


Is .net easier than java?

0 Answers  


Explain the types of memory management? : .NET Architecture

0 Answers  


Different types of authentication modes in .net framework ?

0 Answers  






what are clr,cls,cts?what is .net framework?

6 Answers   Six Sigma,


what is sessions and cookies take one example simple way to understand

0 Answers  


Explain hard disk and what is its purpose? : .NET Architecture

0 Answers  


wild card character in sql ?

2 Answers  


What is cache coherency? : Dot net architecture

0 Answers  


how to manage session in webgarden ?

3 Answers   Binary Logics, Ness Technologies,


What are different types that a variable can be defined and their scopes ?

0 Answers  


Categories