how to find the second highest salary from emp table?
Answer Posted / ramesh lavanuru
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 ? | 52 Yes | 63 No |
Post New Answer View All Answers
What are secondary keys?
Can we use joins in subquery?
What are data types in pl sql?
What is partition by in sql?
what is unique key constraint? : Sql dba
How to create an array in pl/sql?
What are hotfixes and patches?
What is a trigger word?
What is sorting in sql?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
What are the parts of a sql statement?
Explain the methods used to protect source code of pl/sql.
Mention what problem one might face while writing log information to a data-base table in pl/sql?
how to create a new view in mysql? : Sql dba
Is stored procedure faster than query?