How to find second highest salary

Answer Posted / anuj

For Second Highest Salary:
select salary from tbl_name order by salary desc limit 1,1
For Third Highest Salary:
select salary from tbl_name order by salary desc limit 2,1
For Fourth Highest Salary:
select salary from tbl_name order by salary desc limit 3,1

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain type casting and type juggling.

554


What does the initials of php stand for?

533


How to read and display a HTML source from the website url?

557


Explain what is meant by pear in php?

531


How do you define a constant?

545






Is null empty php?

532


What is the difference between require and include in php?

508


What is php and sql used for?

505


What are include() and require() functions?

515


The left association operator % is used in PHP for?

576


What is ci in php?

537


What is the main function of php?

525


What is the difference between characters 23 and x23?

549


What exactly is validating and sanitizing?

617


How do you end php?

510