How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database

plz mail the answer @ mak2786@gmail.com

Answer Posted / yogesh

A little correction:

sol2> select salary from emp order by salary desc limit 1,1;

select salary from emp order by salary desc limit n-1,1;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are rows and columns?

518


Do you know the cursor optimization tips?

578


What is sharding?

88


Would you store your query in a ssrs report or a database server? State the reason why?

108


Explain iaas, paas and saas?

74






What is the architecture of ms sql reporting service?

521


What is a transaction and why is it important?

565


What is sql injection? How to protect against sql injection attack?

553


How to throw custom exception in Stored Procedure?

576


Please explain go command in sql server?

592


How can a database be repaired?

565


How to convert numeric expression data types using the cast() function?

542


What is the difference between stored procedure and user defined functions?

622


What are page splits? : SQL Server Architecture

540


How to manipulate data from one table to another table ?

541