how to get second highest salary in SQL(as/4000

Answer Posted / santosh kumar

select employee_id,last_name,salary
from
(select rownum r,employee_id,last_name,salary
from (select employee_id,last_name,salary from employees
order by salary desc)) a
where a.r=&nth_salary;

---u can find nth highest salary----
for more detail u can contact me at
rajgupta7666@gmail.com....

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to display Row Number with Records in Oracle SQL Plus?

594


What is pl sql block in dbms?

532


What is assignment operator in pl sql?

572


Write a query to display the current date in sql?

522


What are the limitations of sql express?

530






what are enums used for in mysql? : Sql dba

614


What does select count (*) mean in sql?

556


What is sql deadlock?

569


List the different type of joins?

575


What is a behavioral trigger?

517


How can you fetch common records from two tables?

594


Explain 3 basic parts of a trigger.

843


Can primary key be changed?

529


What type of database is cloud sql?

581


What is the source code of a program?

515