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

In MySQL, this query will be easier to find 2nd highest
salary and to fetch all the fields from a table.

select * from emp where sal not in (select max(sal)
from emp) order by sal desc limit 1

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to read/write files to-and-from PL/SQL?

1102


Which one is better sql or oracle?

969


what are all types of user defined functions? : Sql dba

1042


How do you copy a table in sql?

1069


What is multiple partition?

967


How much ram can sql express use?

985


Does sql view stored data?

957


Can you sum a count in sql?

1011


How you improve the performance of sql*loader? : aql loader

1013


Is sql procedural language?

967


Can pl sql procedure have a return statement?

1030


What is the difference between having clause and where clause?

1060


what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure

1763


What is sql basics?

1042


what is the functionality of the function htmlentities? : Sql dba

961