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 .net mobile images control. Explain with an example? : Microsoft dot net mobile
What happens when you try to update data in a dataset in .net while the record is already deleted in sql server as backend?
What is the difference between primary & secondary storage device? : Dot net architecture
Explain the purpose of cache? : Dot net architecture
Explain domestic architecture artifacts? : Dot net architecture
Explain different pipelining hazards and how are they eliminated? : Dot net architecture
What is .net mobile input validation. : Microsoft dot net mobile
What is textbox control of .net mobile? : Microsoft dot net mobile
Explain cache memory? : Dot net architecture
What is the numeric attribute of the textbox control in .net mobile? : Microsoft dot net mobile
What is .net mobile utility controls. Explain with an example? : Microsoft dot net mobile
Is dim fs as filestreamobject is a managed code? : Dot net architecture
What other than biginteger has been introduced in system.numerics namespace?
What is Video Streaming in .net??
5. Wcf- Session Managment