Write a query to find second highest salary of an employee.
Answer Posted / gautam poonia
SELECT sal
FROM (SELECT sal FROM emp
ORDER BY sal desc)
WHERE RowNum<=2
minus
SELECT sal
FROM (SELECT sal FROM emp
ORDER BY sal desc)
WHERE RowNum<=1
Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
What is pl sql block structure?
Why do we need sharding?
Is it possible for a table to have more than one foreign key?
What is the purpose of normalization?
What is the difference between union and union all command?
how is exception handling handled in mysql? : Sql dba
What is mdb stand for?
Why is %isopen always false for an implicit cursor?
How to select unique records from a table?
How would you pass hints to the sql processor?
Explain 3 basic parts of a trigger.
Why we use cross join?
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
Why stored procedure is better than query?
What is not in sql?