Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / niladri saha(oracle apps consu
SELECT EMP_NAME EmployeeName, SAL Salary
FROM EMP
WHERE SAL =
( SELECT SAL
FROM
(
SELECT
DISTINCT SAL
FROM EMP
ORDER BY SAL DESC
)
WHERE ROWNUM=2
);
This Query will list all the employees, having second
highest salary.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is nvarchar in sql?
What are the three pl sql block types?
Can I learn sql in a week?
How much does sql certification cost?
What is view? Can we update view
What is pl sql in dbms?
What is user defined functions?
Explain the difference between rename and alias?
explain commit and rollback in mysql : sql dba
What is an escape character in sql?
What is the difference between clustered and non-clustered index in sql?
Which one is better subquery or joins?
What is the difference between a database and a relational database?
What are packages in pl sql and also explain its advantages?
Why do we use %rowtype & %type in plsql?