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 load a large xml file?
What is Hash Cluster ?
What is different types of joins?
definition of cluster and non-clustered index?
emp numb is unique because that is primary key,,but what is foreign key .. explain very clear with example
How to load data from external tables to regular tables?
What are the uses of Database Trigger ?
interview questions with answer for cts
what is difference between DBMS and RDBMS?
write a query that displays every Friday in a year with date?
How will you identify oracle database software release?
select trunc(round(156.00,-1),-1) from dual;