This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
That's not what I meant (although, as I said before, you'd need to use the LIMIT clause in your existing queries, not just copy the example I gave - using LIMIT is the closest MySQL equivalent of using ROWNUM).
The easiest way, I reckon, would be to use SELECT DISTINCT salary FROM user ORDER BY salary DESC. Then read N rows. The Nth row contains your Nth highest value. Can you do it that way?
Sriinu, that is probably the worst way you can do this. Doing max on a huge table is not cheap. Doing it 3 times is even worse. Also, what if he wants the Nth salary, you will have N nested queries? Poor database!
Mathews approach seems to be the best one. Although I think we can do a little better. I believe MySQL allows you to offset the result set, so something like this will work
Select salary from user order by salary desc limit n-1, n