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 the difference between blob and text? : Sql dba
What is the purpose of normalization?
What are the different types of tables in sql?
What is posting?
What is query optimization in sql?
How do I run a sql query in pgadmin 4?
Can we delete column in sql?
What is the maximum size of sqlite database?
How can I tell if sql is running?
what is self join and what is the requirement of self join? : Sql dba
Is a secondary key the same as a foreign key?
What is sql catalog?
What is sql*loader and what is it used for? : aql loader
What are the differences between implicit and explicit cursors?
Explain ddl statements in pl/sql?