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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cache coherency and how is it eliminated? : .NET Architecture

622


What are the major differences between services and web services?

582


Can you explain atlasuiglitz library?

609


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

611


Whate are resource files? How are they used in .net?

567






What are the important principles of soa (service oriented architecture)?

587


How can we perform data binding in atlas?

596


Define cache coherency and how is it eliminated? : Dot net architecture

600


What is the difference between primary & secondary storage device? : Dot net architecture

606


Can I create my own context attributes?

645


What are public and private assemblies ?

623


What are relation objects in dataset?

636


What is the access level of the visibility type internal?

682


Can you explain server controls in atlas?

611


Does .NET runtime offer Deterministic Destruction or not?

670