how to find the n'th highest salary from emp ?

Answer Posted / madhu

to get nth higest value

SELECT EMP_NAME,EMP_SALARY
FROM EMP_TABLE
ORDER BY EMP_SALARY DESC
LIMIT n-1, 1

this is for mysql server

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?

1787


How to define a procedure inside another procedure?

549


What are the restrictions on external table columns?

552


How to resolve name conflicts between variables and columns?

574


When do I need to use a semicolon vs a slash in oracle sql?

594






What happens to the indexes if a table is recovered?

579


Can you assign multiple query result rows to a variable?

552


Explain the function of optimizer in oracle?

602


What privilege is needed for a user to delete rows from tables in another schema?

564


hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.

1760


How to write a query with a left outer join in oracle?

607


what is port in oracle? how is it related to database application.

1440


What is a nvl function?

566


Can we call procedure inside function in oracle?

614


What is a package ? What are the advantages of package ?

606