how to find the second highest salary from emp table?

Answer Posted / dakshin

select * from (select a.*,dense_rank() over (order by sal) rnk from emp a order by sal) where rnk =2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql lookup?

516


Why do we use %rowtype & %type in plsql?

610


What are the sql aggregate functions?

612


What is synchronized subquery?

600


What is a pragma statement?

723






What are the different types of dbms?

554


what are integrity rules?

572


give the syntax of grant and revoke commands? : Sql dba

619


What is the difference between an inner join and an outer join?

516


what is self-join? : Sql dba

573


What is sql in java?

549


What is function and procedure?

570


Why truncate is faster than delete?

567


how to create a table index in mysql? : Sql dba

599


What are the different dml commands in sql?

586