how to find the second highest salary from emp table?
Answer Posted / shrikant
You can find nth max salary
change "limit 0,n" where n = 1,2,3...
select b.sal from (select a.sal from (select distinct sal
from emp order by sal desc) a limit 0,n) b order by sal asc
limit 0,1;
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain clause in sql?
Why is theta join required?
What is int identity in sql?
What are different types of sql?
what is unique key constraint? : Sql dba
What are database links used for?
Is sql an operating system?
What are functions in sql?
Why partition by is used in sql?
What is the difference between view and stored procedure?
What are different types of statements supported by sql?
What is a heap in sql?
Is sql sequential or random?
What is the difference between clustered and non-clustered indexes?
What is the difference between inner join and left join?