PHP Open Source Help
This blog will give you all kind of Open Source help like Drupal, Zend, Symfony, Joomla and Magento.
Wednesday, 20 July 2011
How to get 2nd highest salary in mysql?
There are two way to get solution:
1.) select distinct(salary) from employee order by salary desc limit 1,1 ;
2.) select max(salary) from employee where salary < (select max(salary) from employee);
Post a Comment
Post Comments (Atom)