how we can find nth max salary from an employe table by
using my sql?

Answer Posted / sandeep

select MAXIMUM(salary) from (select salary from employee
order by salary desc limit 'n')

n means number of rows

Is This Answer Correct ?    10 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why mongodb is faster than mysql?

473


What is a tinyint?

513


What are views in mysql?

521


What is unsigned in mysql?

511


Where does mysql store data?

446






What is difference mysql and mysqli?

515


How do I insert multiple rows in a table?

461


How large can a mysql table be?

460


How do I copy a table in mysql?

488


What is the usage of ENUMs in MySQL?

637


How can we get the number of rows affected by query?

555


How can you retrieve a particular number of records from a table?

501


How to Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.

535


Which is better sqlite or mysql?

497


How can we optimize stored procedure?

493