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 / ram achare

for 2nd highest salary
select sal from(select distinct sal from emp order by sal desc limit 2)emp order by salary limit 1;
for 3rd highest salary
select sal from(select distinct sal from emp order by sal desc limit 3)emp order by salary limit 1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is pl sql used?

1030


Is it possible to update views?

1007


Which one is better subquery or joins?

1118


Do ddl statements need commit?

1023


What is schema in sql?

1002


What is use of package in pl sql?

1071


What is dcl in sql?

1024


Explain ttitle and btitle.

1165


Define select, insert, create, delete, update, drop keywords

1094


how to see the create table statement of an existing table? : Sql dba

1060


What is the difference between a primary key and a clustered index?

1037


What does sql stand for?

1055


what are the different type of normalization? : Sql dba

1072


Can we perform dml on view?

1118


How many sectors are in a partition?

1119