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 / chirag shah

select DISTINCT(salary) from emp order by salary desc limit 1,1

this limit gives you 2nd record
if you want 3rd value then write limit 3,1

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I learn sql in a week?

1075


Which is faster joins or subqueries?

991


What is 19 null in sql?

968


What is the difference between the conventional and direct path loader? : aql loader

1153


Where not exists in sql?

980


Which are the different types of indexes in sql?

1061


What is anonymous block in sql?

1121


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1269


What is write ahead logging in sql server?

1052


What is the mutating table and constraining table?

1026


Why stored procedure is better than query?

948


What is a relationship and what are they?

1153


What is nosql vs sql?

1179


Enlist the characteristics of pl/sql?

1803


What is the process of copying data from table a to table b?

1093