Write query to fetch second maximum salary from employee table.
Answers were Sorted based on User's Feedback
Answer / ritesh
select max(salary) from emptable where salary < (select max(salary) from emptable);
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / vijayalakshmi
select top 1 Coumn_Name from (select top 2 Coumn_Name from Table_name order by Coumn_Name desc) b order by Coumn_Name
Is This Answer Correct ? | 4 Yes | 0 No |
select a.last_name,a.salary from employees a where 3=(select count(*) from employees b where b.salary>a.salary) order by a.salary desc.
<<<<<<<<<[N-1]>>>>>>>>>>
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / santosh kumar
select * from(select rownum r,ename,sal from(select * from emp order by sal desc))where r=2;
Is This Answer Correct ? | 0 Yes | 0 No |
find the second highest salary of the emp table
How to rebuild an index in oracle?
How many types of table in Oracle?
What is a package in oracle?
Can you tell me how to add new column in existing views?how?How is possible?
What are different Oracle database objects?
Select all the employees who were hired in last 2 years and who works in dept where max managers are working.
How to assign values to variables?
Explain the concept of the DUAL table.
Explain the use of owner option in exp command.
How to check database size in Oracle?
Is the After report trigger fired if the report execution fails ?