Write a query to find second highest salary of an employee.
Answer Posted / deepshikha
SELECT MAX (sal)
FROM emp a,
(SELECT MAX (sal) max_sal
FROM emp) abc
WHERE a.sal < abc.max_sal
ORDER BY sal DESC;
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is a procedure in pl sql?
Which table is left in join?
Why do we need cursors in pl sql?
Can a table have no primary key?
What are the different dcl commands in sql?
How do I start sql from command line?
What is the difference between alter trigger and drop trigger statements?
Why cross join is used?
What is the difference between view and stored procedure?
define data blocks ? : Sql dba
How do I count rows in sql?
what are the properties and different types of sub-queries? : Sql dba
What is the advantage of index in sql?
Differentiate between % rowtype and type record.
How can you fetch first 5 characters of the string?