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

If I'm developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?

3 Answers   Hologic, Siebel,


inprocess vs out process session state : Dot net architecture

0 Answers  


What size is a .net object?

0 Answers  


WHAT IS COMPUTER

7 Answers   NICE, TVS,


What are end points, contract, address and bindings?

0 Answers  






what is page_directive

1 Answers   BoA, ICT, PCS,


So what exactly is the configuration file for then?

0 Answers  


Explain the race around condition? : .NET Architecture

0 Answers  


can any one urls for learning .net(which is written in simple english)

1 Answers  


how do u achieve multilevel inheritance in .NET ?

9 Answers   Accenture, Ness Technologies, SteelWedge,


How do I prevent concurrent access to my data?

0 Answers  


IN C# if we click a field in the dropdownlist then i have to get the respected field details in the next textbox..........

2 Answers  


Categories