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 are operators available in sql?

595


Does user triggers have entry for trigger with compilation errors?

608


How many sql commands are there?

685


does sql support programming? : Sql dba

615


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

585






Is like operator in sql case sensitive?

519


What is a join?

636


how can you see all indexes defined for a table? : Sql dba

551


What is memory optimized table?

583


What is a memo field?

539


How can a pl sql block be executed?

539


What are pl sql data types?

555


Determine if oracle date is on a weekend?

566


What is sql injection owasp?

558


What is cursor in pl sql?

584