Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / mark berlin

-- Solution #3
select distinct salary from (
select salary,
RANK() OVER (order by salary desc NUlls last) as RRANK
FROM employees
)
Where RRANK = 2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why commit is not used in triggers?

587


What is the maximum rows in csv?

493


Which certification is best for sql?

544


What is sql trigger example?

543


What is java sql package?

543






What are pl/sql cursor exceptions?

581


What are the different types of triggers?

595


What is the difference between delete, truncate and drop command?

554


What is a database? Explain

598


when is the use of update_statistics command? : Sql dba

504


what are null values? : Sql dba

548


what is normalization? : Sql dba

565


what is a trigger in mysql? : Sql dba

609


What is constant in pl sql?

519


what are the advantages of using stored procedures? : Sql dba

622