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
i forgot order by in da last post
SQL Server:
Select MIN(Salery) from (SELECT TOP 2 * from EMPLOYEE order
by Salery DESC)
Oracle:
Select MIN(Salery) from (SELECT * from EMPLOYEE where ROWNUM
<3 order by Salery DESC)
MySQL
Select MIN(Salery) from (SELECT * from EMPLOYEE order by
Salery DESC LIMIT 2)
likewise for 2nd minimum salery.
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What are the types of memory management? : Dot net architecture
How is the using() pattern useful? What is idisposable?
What is a clickonce application?
Explain the use of virtual, sealed, override, and abstract.
What re interop services?
How to improve the cache performance? : Dot net architecture
Name some changes done since version 3.0?
difference between Response.write,server.transfer and also which one is used when ?
Explain about httpruntime.cach.get(); method?
How will you do windows authentication and what is the namespace?
What is Opf3
Can you explain update progress control?
What is different about namespace declaration when comparing that to package declaration in java?
Explain the difference between state server and sqlserver : Dot net architecture
Explain cache? : .NET Architecture