How to find out the second largest element from mysql table

Answer Posted / shanmukha

select min(salary) from Employee where salary in(select
distinct top 2 salary from Employee order by salary desc )

This is the query to find second maximum salary in MSSQL

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I save in mysql?

574


How to upload a large file through phpmyadmin in mysql?

516


What is a mysql model?

578


What is mysql cursor?

574


What is inner join in mysql?

549






What are the advantages of mysql?

616


How would you enter characters as hex numbers?

595


Does mysql case matter?

573


Can you tell few best practices to be followed for optimization in sql?

574


What happens if you no create privilege in a database?

655


Where MyISAM table will be stored and also give their formats of storage?

713


Is mysql port 3306 tcp or udp?

589


How do I start mysql server?

552


How do you determine the location of mysql data directory?

573


How can we convert between Unix & MySQL timestamps?

530