Find out the 3rd highest salary?

Answer Posted / av.anil

SELECT * FROM
(SELECT Ename,Sal,
DENSE_RANK()
OVER(ORDER BY Sal DESC) "D_RK"
FROM Emp)
WHERE D_RK = 3;

This query gives exact highest salary.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the nonstandard string types? : Sql dba

608


What is rownum and rowid?

570


How to load data with sql*loader?

552


What is difference between sql function and stored procedure?

507


Is sql easier than java?

527






What is dbo in sql?

536


How does a self join work?

520


How can you select unique records from a table?

521


What is plpgsql language?

534


What is the most restrictive isolation level? : Transact sql

557


what is the difference between where clause and having clause? : Sql dba

541


Are subqueries faster than joins?

577


What is the process of copying data from table a to table b?

600


what is a table in a database ? : Sql dba

544


What are the two characteristics of a primary key?

493