how to find the second highest salary from emp table?
Answer Posted / mohammed irfan
SELECT sal1 "salary"
FROM (SELECT ROWNUM rownum1 ,sal1
FROM (SELECT sal sal1
FROM emp
ORDER BY sal DESC
)
)
WHERE rownum1=:p_highest;
Note:- 'p_highest' here we can give the number as we want
to display the highest salary.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what are myisam tables? : Sql dba
how are mysql timestamps seen to a user? : Sql dba
What is normalization sql?
What does an inner join do?
what is clause? : Sql dba
What are stuff and replace function?
What does stand for in sql?
How do I audit the sql sent to the server?
Why do we use sql constraints?
What is latest version of sql?
What are inbuilt functions in sql?
Why sql query is slow?
What is offset and limit in sql?
What are the commands used in sql?
Is sql pronounced sequel or sql?