how to calcuate the second highest salary of he employee

Answer Posted / eshwer

Try this
select * from (SELECT empno,sal, DENSE_RANK() OVER (ORDER BY sal desc) AS SalRnk
FROM scott.emp) where salrnk=2;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the basic structure of an sql?

584


explain the difference between bool, tinyint and bit. : Sql dba

538


What is user in sql?

594


What is pls_integer in pl sql?

552


When sql appeared?

635






Can you call pl/sql package functions from within a fast formula?

578


What is an ndf file?

542


How can I get the number of records affected by a stored procedure?

586


Explain the difference between cursor declared in procedures and cursors declared in the package specification?

585


What is string join?

565


What is the purpose of using pl/sql?

674


What are the types of variables use in pl sql?

519


Can sql function call stored procedure?

566


What is multiple columns?

584


How to run sql statements through the web interface?

522