how to find the second highest salary from emp table?
Answer Posted / susanta
select * from emp e1 where N-1 =
(select count(distinct sal)
from emp e2
where e2.sal > e1.sal)
for Nth highest salary.
| Is This Answer Correct ? | 20 Yes | 11 No |
Post New Answer View All Answers
What is union and union all keyword in sql and what are their differences?
Explain the purpose of %type and %rowtype data types with the example?
Is progress software supports to ( pl/sql )?
What company owns postgresql?
Why is partition used in sql?
How to look at the current sql*plus system settings?
What are the types of keys?
How would you pass hints to the sql processor?
What is update query?
Is truncate ddl or dml?
what are the types of join and explain each? : Sql dba
How do I write a sql query in pgadmin 4?
What's the difference between a primary key and a clustered index?
What are triggers in sql?
What does stand for in sql?