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 an inner join and an outer join?
What is java sql connection?
What is java sql drivermanager?
What is sql trigger example?
What is pivot in sql?
What is range partitioning?
difference between anonymous blocks and sub-programs.
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
Can we write ddl statements in functions?
Can you have more than one trigger on a table?
Are subqueries better than joins?
what are the features and advantages of object-oriented programming? : Sql dba
What is data control language?
define join and explain different type of joins? : Sql dba
How do you select unique values in sql?