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
Is primary key clustered index?
What is the difference between a procedure and a function?
What is microsoft t sql?
What is cursor and its types?
What is rank function in sql?
What is the difference between sql and t sql?
how to drop an existing index in mysql? : Sql dba
Does db2 use sql?
What are schema-level triggers?
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
What is the left table in sql?
Are pl sql variables case sensitive?
What is using in sql?
What do you understand by pl/sql packages?
Does asenumerable execute the query?