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 |
What are the oracle differences between nvl and coalesce
Give the Types of modules in a form?
What is key preserved table?
how to hide the stored procedure inside a package
What is the dynamic sql in oracle?
What is open database communication (odbc) in oracle?
How would you best determine why your MVIEW couldnt FAST REFRESH?
What are the different approaches used by Optimizer in choosing an execution plan ?
What is meant by redo log buffer ?
What is oracle used for?
What are the various constraints used in oracle?
what is the syntax of DELETE command?