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 full outer join same as cross join?

1016


How do you clear the screen in sql?

1123


Is sql sequential or random?

1086


What are the types of triggers in sql?

1143


How many disk partitions should I have?

1040


What does the base_object_type column shows in the user.triggers data dictionary view?

1097


Is sql considered coding?

1088


Why should I use postgresql?

1068


Is the primary key an index?

1078


what is the difference between $message and $$message? : Sql dba

1039


Can a foreign key be a duplicate?

963


What is the difference between count 1 and count (*) in a sql query?

1054


What is a loop in sql?

1037


What is the difference between a primary key and a unique key?

1108


What is the purpose of a secondary key?

1018