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

What is update query?

1033


what is an alias command? : Sql dba

1171


How do I view stored procedures?

1023


what are the advantages of sql ? : Sql dba

1106


What is database sql?

1098


What is left inner join in sql?

1094


What are the usages of sql?

1102


Explain the working of primary key?

1154


What is cartesian join in sql?

1196


Is a view faster than a stored procedure?

1011


How to combine two stored procedures in sql?

1325


how would you enter characters as hex numbers? : Sql dba

1036


Can we use rowid as primary key?

1044


how to shut down the server with 'mysqladmin'? : Sql dba

1051


Can we insert in view in sql?

1106