how to find the second highest salary from emp table?

Answer Posted / raghu munukutla

SQL> select max(sal) from emp where rownum<=(select
count(sal)-1 from emp)
order by sal desc;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a stored procedure in sql with example?

595


How do you update a sql procedure?

518


What is database white box testing and black box testing?

631


Define overloaded procedure?

617


How many types of index are there?

541






Can %notfound return null after a fetch?

581


what is the bond code in materialized view?

2485


Is sql a oracle?

519


Are left and right joins the same?

525


What is the difference between subquery and correlated query?

525


what is a table in a database ? : Sql dba

535


Write an sql query to select all records from the table?

551


What is difference between db2 and sql?

526


What is an inner join sql?

540


What is the usage of sql functions?

535