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
How to raise user-defined exception with custom sqlerrm ?
Explain how can you save or place your msg in a table?
What is the difference between jpql and sql?
What company owns postgresql?
how to convert character strings to dates? : Sql dba
Explain spool.
What is sql basics?
What is trigger price?
What are the properties of a transaction?
How do we use distinct statement? What is its use?
What is foreign key sql?
What is the difference between explicit and implicit cursors in oracle?
how many sql ddl commands are supported by 'mysql'? : Sql dba
how to include comments in sql statements? : Sql dba
How to use sql*plus built-in timers?