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

Can we create foreign key without primary key?

983


What is the advantage of nosql?

1061


Why stored procedure is better than query?

946


What is cold data?

954


Why function is used in sql?

941


What are different functions in sql?

942


How do I start sql from command line?

1021


What is delete command in sql?

1110


What is the use of pl/sql table?

1064


What is the difference between a procedure and a function?

1106


What is index example?

1006


What are the most important ddl statements in sql?

1110


What is thread join () in threading?

1007


What does the argument [or replace] do?

1077


What are the types of index in sql?

1065