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

what is log shipping? : Sql dba

1111


How many sql statements are used?

1008


how to include character strings in sql statements? : Sql dba

1067


what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba

1039


What are the possible values that can be stored in a boolean data field?

998


How do we use distinct statement? What is its use?

1030


what happens if you no create privilege in a database? : Sql dba

1001


What is a temporal data type?

1045


How is indexing done in search engines?

982


when MSQL8.0 is in market

2074


what are the type of locks ? : Sql dba

962


What are the two types of periodical indexes?

936


What is date functions?

1028


What is the cause of mutating table error and how can we solve it?

1047


what are the difference between clustered and a non-clustered index? : Sql dba

1030