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 is application frame host?
How to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
how to change the title of my window?
What is an asssembly qualified name? Is it a filename? How is it different?
Explain difference between machine config vs. Web config? : .NET Architecture
Explain different pipelining hazards? : Dot net architecture
What is a virtual memory? : .NET Architecture
What is the importance of updatepanel control?
Differences between VS 2005, 2008 and 2010 ?
What is code access security (cas)?
Define cache coherency and how is it eliminated? : Dot net architecture
What is private constructor? And it's use?
Explain dma? : Dot net architecture
How does an appdomain get created?
Differnce between managed code and unmanaged code ?