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
Do you know textbox and textview controls of .net mobile? : Microsoft dot net mobile
What are different types that a variable can be defined and their scopes ?
What is a virtual memory? : Dot net architecture
Explain different pipelining hazards and how are they eliminated? : Dot net architecture
Explain the difference between l1 and l2 cache? : .NET Architecture
how we can fire event in databound column in datagrid without using button?
Differnce between managed code and unmanaged code ?
What is MS chart control in visual studio?
how to change row background color in gridview
4. Wcf- what Asych and Sych call and how that works
Explain about httpruntime.cach.get(); method?
What are relation objects in dataset?
What are the important principles of soa (service oriented architecture)?
Explain how cache is used? : Dot net architecture
Different types of authentication modes in .net framework ?