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
Explain the purpose of %type and %rowtype data types?
what is the difference between a having clause and a where clause? : Sql dba
How to run sql commands in sql*plus?
What is a constraint? Tell me about its various levels.
How many sql commands are there?
What is sorting in sql?
How to get each name only once from an employee table?
What are synonyms in sql?
What do you understand by pl/sql cursors?
what is the difference between ereg_replace() and eregi_replace()? : Sql dba
How many developers work on postgresql?
Why use stored procedures?
How do I access sql anywhere database?
Can we use pl sql in sql server?
What is sql in java?