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

What is an oracle transaction?

0 Answers  


What is cluster Key ?

3 Answers  


can anyody please send me the dump for Oracle 10g certifications for DBA path?

0 Answers  


Difference between primary key and unique key ?

77 Answers   Accenture, B2B Software Technologies, Cognizant, HP Finsoft, IndiaNIC, Karomi Technology, Keane India Ltd, L&T, Onward eServices, R Systems, Shakti, Techtic Solutions,


In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.

0 Answers   IBM,






In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?

1 Answers  


if you update view? where we store the data?

5 Answers   Cap Gemini,


Can we connect to ORACLE db using Windows Authentication?

0 Answers   MCN Solutions,


25. Display the client number and the value of the highest value order placed by that client.

2 Answers   Wipro,


1.What is inline function in oracle and its purpose? 2.What is the equivalent operator for "different from pattern" in oracle? 3. If you define a variable in oracle, how it will be available? [a. Until database shut down b. Until table deleted c. until session get expired]

2 Answers  


How would you change old and new values in an insert, delete and update triggers?

0 Answers  


i wrote a pl/sql procedure. it must run every sunday 4.40 How can i schedule it with the help of dbms_jobs (or another other procedure with out creating bat file,exe file)

0 Answers   eicc,


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)