how to find the second highest salary from emp table?
Answer Posted / subash pandey
SELECT salary
FROM employee e
WHERE n = (
SELECT count( * )
FROM employee
WHERE salary > e.salary )
n=1 or 2 or 3 n is level which level max salary you want
i test this it proper work
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is delete command in sql?
When is the update_statistics command used?
Explain commit, rollback and savepoint.
GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?
How does sql store data?
Explain ddl statements in pl/sql?
What are the different types of sql commands?
What is a temporal table?
What is the use of <> sql?
Is a secondary key the same as a foreign key?
What is data modelling in sql?
What is synonyms?
Can we write ddl statements in functions?
What is foreign key sql?
Why is a trigger used?