find out the second highest salary?

Answers were Sorted based on User's Feedback



find out the second highest salary?..

Answer / padiya hiten

select * from emp e1 where (3=(select count(distinct
(e2.sal))from emp e2 where e2.sal>=e1.sal));

Is This Answer Correct ?    4 Yes 6 No

find out the second highest salary?..

Answer / sumeet

select min(sal) from emp where sal in (select top 2 sal from
emp order by sal desc);

Is This Answer Correct ?    0 Yes 3 No

find out the second highest salary?..

Answer / shachindra pandey

proc sql;
select id,name,population from populations where
population=(select max(population) from
populations
where population < (select max(population) from
populations));


quit;

Is This Answer Correct ?    18 Yes 22 No

find out the second highest salary?..

Answer / tejinder

select salary from emp order by salary desc limit 0,1;

Is This Answer Correct ?    0 Yes 5 No

find out the second highest salary?..

Answer / kiran

select max(empsal) from emp where rownum<=2

Is This Answer Correct ?    24 Yes 188 No

Post New Answer

More Oracle General Interview Questions

How to view the tablespaces in the current database?

0 Answers  


Explain a private synonyms?

0 Answers  


State the various uses of dbcc command?

0 Answers  


hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.

0 Answers  


How to invoke the data pump export utility?

0 Answers  






find out first highest salary?

10 Answers   Verinon Technology Solutions,


How to retrieve values from data fields in record variables?

0 Answers  


How would you go about verifying the network name that the local_listener is currently using?

0 Answers  


Describe an oracle table?

0 Answers  


How to update values on multiple rows in oracle?

0 Answers  


what is the difference between joins and set operators.i am always confusing with two,can u pls kindly help me .

5 Answers   HCL, LN,


How to commit the current transaction in 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)