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
How do you select unique values in sql?
How can I speed up sql query?
What is the difference between distinct and unique in sql?
what is the difference between a web-garden and a web-farm? : Sql dba
What are views in sql?
what is index? : Sql dba
What does sql stand for?
How do I start pl sql?
How many types of literals are available in pl sql?
What is primary key and foreign key with example?
What is cursor in pl sql?
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
What is difference between stored function and application function?
What is a null value?
How exception handling is done in advance pl/sql?