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
What is the purpose of the sql select top clause?
Why we use triggers in mysql?
Does a user_objects view have an entry for a trigger?
How do I view tables in mysql?
Which command is used to delete a trigger?
What is field delimiter?
How do I run sql profiler?
What is data manipulation language?
What is the difference between left join and right join?
what is the stuff function and how does it differ from the replace function? : Sql dba
What are the limitations of sql express?
Where do we use pl sql?
Is primary key clustered or nonclustered?
what is auto increment? : Sql dba
Is ms sql traffic encrypted?