Write a query to find second highest salary of an employee.

Answer Posted / murali

SELECT
MAX(Sal)
FROM
Emp
WHERE
Level=&Levelno
ORDER BY PRIOR Sal>Sal
GROUP BY Level

--Here we have to give &Levelno = 2

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all types of user defined functions?

532


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

556


Explain what is dbms?

581


How to take user input in pl sql?

705


What is nosql vs sql?

569






What is rank dense_rank and partition in sql?

539


How do I sort a table in sql?

599


what is union, minus and interact commands? : Sql dba

662


What is nested table in pl sql?

555


Why truncate is faster than delete?

565


How can you create an empty table from an existing table?

596


what is the difference between delete and truncate statement in sql? : Sql dba

551


What are crud methods?

553


What is a ddl command?

536


What is sql*plus?

573