how to find the second highest salary from emp table?

Answer Posted / anuj maheshwari

select sal from emp where sal=(select max(sal) from emp
where sal<(select max(sal) from emp));

Is This Answer Correct ?    34 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which query operators in sql is used for pattern matching?

534


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

592


Can you join a table to itself?

532


what is the difference between where clause and having clause? : Sql dba

527


Is sql procedural language?

546






What are procedures used for?

519


Is pl sql useful?

535


What is cte?

566


What is not equal in sql?

501


What is trigger and how to use it in sql?

529


Is clustered index a primary key?

520


What is the benefit of foreign key?

522


what is cursor. write example of it. What are the attributes of cursor.

736


What is a record in pl/sql?

539


What is sql*loader and what is it used for?

570