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
Can we create foreign key without primary key?
What is the advantage of nosql?
Why stored procedure is better than query?
What is cold data?
Why function is used in sql?
What are different functions in sql?
How do I start sql from command line?
What is delete command in sql?
What is the use of pl/sql table?
What is the difference between a procedure and a function?
What is index example?
What are the most important ddl statements in sql?
What is thread join () in threading?
What does the argument [or replace] do?
What are the types of index in sql?