Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


1.how to extract the second highest salary from emp table
having sal as a column which contains the salary of all
employee of an organisation.

Answers were Sorted based on User's Feedback



1.how to extract the second highest salary from emp table having sal as a column which contains the..

Answer / ramya

select max(sal) from employees where
sal < (select max(sal) from employees)

Is This Answer Correct ?    21 Yes 2 No

1.how to extract the second highest salary from emp table having sal as a column which contains the..

Answer / neha k

select sal
from (SELECT sal, rownum row_num
FROM emp
order by sal desc)
where row_num = 2;

Is This Answer Correct ?    5 Yes 1 No

1.how to extract the second highest salary from emp table having sal as a column which contains the..

Answer / hema

Select sal from emp a where 2=(select count(distinct sal)
from emp b where a.sal <= b.sal)

Is This Answer Correct ?    2 Yes 2 No

1.how to extract the second highest salary from emp table having sal as a column which contains the..

Answer / esakkiraja

select a.* from(select dense_rank() over(order by sal)as
new_rank from emp) a where new_rank=2

Is This Answer Correct ?    0 Yes 1 No

1.how to extract the second highest salary from emp table having sal as a column which contains the..

Answer / swapna

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

Is This Answer Correct ?    0 Yes 4 No

1.how to extract the second highest salary from emp table having sal as a column which contains the..

Answer / swapna

select top(1) sal From sample
where sal
in (select top(2) salfrom sample order by saldesc)
order by sal asc

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More Oracle General Interview Questions

I need to get the values of the previous quarter.how to do this?eg: if my cuurent month is may i need to get the datas of the month jan,feb,march.Can it be done in oracle.I tried with date function q but for the month jan its not retriving the previous quarter(oct-dec).how to solve this.plpz anyone help me?

2 Answers   Philips,


How to get a list of all user accounts in the database?

0 Answers  


What is Database Buffers ?

1 Answers  


How to define an anonymous block?

0 Answers  


How to drop a tablespace?

0 Answers  


What are the limitations oracle database 10g xe?

0 Answers  


Please help me how to write a Query to change the primary key constraint from 1 attribute to another attribute in a table

3 Answers  


Explain what are synonyms used for?

0 Answers  


How to speed up webrick?

0 Answers  


How do I call oracle stored procedures that take no parameters?

0 Answers  


Difference between NO DATA FOUND and %NOTFOUND?

1 Answers  


What is bind variable in oracle 11g?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • 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)