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
Which join condition can be specified using on clause?
What is error ora-12154: tns:could not resolve the connect identifier specified?
What is the main reason behind using an index?
Can I join the same table twice?
how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba
How to avoid duplicate records in a query?
What are the main features of cursor?
Do ddl statements need commit?
Is sql an operating system?
Is t sql a programming language?
Explain about various levels of constraint.
Explain what is sql*plus?
Why select is used in sql?
What is the difference between union and union all command?
When are we going to use truncate and delete?