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...

how to find the second highest salary from emp table?

Answer Posted / abhijit banik

To get the n-th highest salary from employee table in oracle-10g
--------------------------------------------------------------
select min(salary)
from
(
select rownum rn, salary
from
( select distinct(salary) from employee order by salary desc )
)
where rn<=&n+1

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is left join same as inner join?

1023


What is a composite primary key?

1033


What is nvarchar max in sql?

960


What are the different types of triggers?

1056


What is a schema? How is it useful in sql servers?

1044


How delete a row in sql?

929


how to shut down the server with 'mysqladmin'? : Sql dba

957


Can a foreign key be a duplicate?

859


what is collation? : Sql dba

1079


How do I view a sql database?

985


Explain the insert into statements in sql?

939


Which language is used in sql?

992


Is coalesce faster than isnull?

909


Is not equal in sql?

960


Determine if oracle date is on a weekend?

984