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
Why functions are used in sql?
Explain how to use transactions efficiently : transact sql
What does the hierarchical profiler does?
what's the difference between a primary key and a unique key? : Sql dba
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
How do you create a db file?
Is postgresql a nosql database?
What is %type in sql?
What is pl sql block in dbms?
Is not equal in sql?
Explain the uses of control file.
What are the string functions in sql?
What do you understand by pl/sql records?
What is rename in sql?
What is a natural join sql?