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 difference between Desktop, Client Server & Web based applications?
how to set the startup position of the form?
What is .net mobile images control. : Microsoft dot net mobile
Explain dma? : .NET Architecture
Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form.
Explain different pipelining hazards and how are they eliminated? : .NET Architecture
Explain the process of gc?
What is the use of TPL DATAFLOW?
What is the difference between .net mobile pages and ordinary .net web page? : Microsoft dot net mobile
What is the access level of the visibility type internal?
Explain the race around condition? How can it be overcome? : Dot net architecture
What are .net mobile controls features? : Microsoft dot net mobile
What is WPF and WCF?
HttpHendler and HttpModules
How can we perform data binding in atlas?