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 we alter stored procedure?

939


what are the different functions in sorting an array? : Sql dba

967


what is a primary key? : Sql dba

981


Can we use pl sql in mysql?

959


what are string data types? : Sql dba

971


How to sort the rows in sql.

1002


Is a view faster than a stored procedure?

899


What is a boolean in sql?

943


Is sqlite thread safe?

990


What is t sql in sql server?

999


What is the unique index?

1000


Why do we use procedures in sql?

1016


Can we perform dml in function?

1012


Which is faster truncate or drop?

978


What is a Mapplet?

1054