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 |
HOW TO DISPLAY MAXIMUM SALARIES FROM EMP DEPARTMENT VISE ALONG WITH DEPARTMENT NAMES? E.g EMP,DEPT
5 Answers College School Exams Tests, DELL,
Calculate difference between 2 date / times in oracle sql?
9. Display the client name and order date for all orders using the JOIN . . . USING method.
What is a system tablespace and when it is created?
What does ROLLBACK do ?
What is the difference between SQL and SQL Server?
how to truncate date and get only time part 9:20:00
How many data types are supported?
When system tablespace is created?
What are virtual columns?
Who developed oracle & when?
19. Display all clients whose name begins with the letter J or contains the letter M anywhere or contains E as the third letter.