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?
HI Guys,
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);
ReplyDeleteWonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!
PHP MYSQL Developers in India