Write query to fetch second maximum salary from employee table.

Answers were Sorted based on User's Feedback



Write query to fetch second maximum salary from employee table...

Answer / ritesh

select max(salary) from emptable where salary < (select max(salary) from emptable);

Is This Answer Correct ?    8 Yes 0 No

Write query to fetch second maximum salary from employee table...

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

Write query to fetch second maximum salary from employee table...

Answer / abhishekjaiswal

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

Write query to fetch second maximum salary from employee table...

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

Post New Answer

More Oracle General Interview Questions

hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.

0 Answers  


Which environment variables are absolutely critical in order to run the OUI?

0 Answers  


Give the Types of modules in a form?

1 Answers  


What is OCI. What are its uses?

1 Answers  


Differentiate between pre-select and pre-query?

0 Answers  






4. Using a set operator, display the creditor number of all creditors who have ever been paid.

2 Answers   Wipro,


You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?

0 Answers  


How do you find out from the RMAN catalog if a particular archive log has been backed-up?

0 Answers  


Please explain drop constraint oracle?

0 Answers  


Assuming that you are an End User How to find that in the payment Batch some of the Invoice was  Missing To pay How to find That??

0 Answers  


What is a database schema in oracle?

0 Answers  


What is dual table oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)