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 / shrikant

You can find nth max salary

change "limit 0,n" where n = 1,2,3...

select b.sal from (select a.sal from (select distinct sal
from emp order by sal desc) a limit 0,n) b order by sal asc
limit 0,1;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the sql select top clause?

1021


Why we use triggers in mysql?

938


Does a user_objects view have an entry for a trigger?

963


How do I view tables in mysql?

917


Which command is used to delete a trigger?

1262


What is field delimiter?

991


How do I run sql profiler?

1007


What is data manipulation language?

1137


What is the difference between left join and right join?

889


what is the stuff function and how does it differ from the replace function? : Sql dba

991


What are the limitations of sql express?

988


Where do we use pl sql?

944


Is primary key clustered or nonclustered?

954


what is auto increment? : Sql dba

965


Is ms sql traffic encrypted?

875