how to find the second highest salary from emp table?
Answer Posted / praveenkumar
SELECT salary FROM EMPtable
WHERE salary NOT IN ( SELECT MAX(salary)
FROM EMPtable)
ORDER BY salary DESC
FETCH FIRST ROW ONLY
---
We have verified and its working
fine.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is clause in sql?
What is the difference between a subquery and a join?
Where the sql database files are stored?
What is the difference between a query and a report?
Is full outer join same as cross join?
How can we implement rollback or commit statement in a trigger?
what does the t-sql command ident_current does? : Transact sql
What is sql key?
How many types of cursors supported in pl/sql?
what are the differences between char and varchar? : Sql dba
What is before and after trigger?
Is postgresql a server?
what is heap table? : Sql dba
Is sql developer case sensitive?
How can you select unique records from a table?