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

Answer Posted / jithu

Another way is::

SELECT sal FROM sal a WHERE n = ( SELECT count(*) FROM sal
b WHERE b.sal < a.sal)

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is mysql a scripting language?

467


How we get sum of column.

505


What is InnoDB?

562


If we use sum function in mysql, does it return sum of that row or for that column?

526


How do I create a new database in mysql?

476






What is prepared statement in mysql?

487


What is the difference between having and where clause in mysql? Explain

536


What is mysql used for?

514


What is a scalar function?

526


Can we store images in mysql database?

482


What are the advantages of a procedure?

468


How to calculate the difference between two time values?

453


What is difference between pdo and mysqli?

465


How to create a table?

549


How is data stored in mysql?

494