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

how many tables will create when we create table, what are they? : Sql dba

1018


Is vs as in pl sql?

932


What is trigger in sql? Explain

940


How can you fetch first 5 characters of the string?

945


What is the use of triggers?

974


How to read/write files from pl/sql?

991


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

944


what are the different index configurations a table can have? : Sql dba

936


Is pl sql useful?

930


What do you understand by pl/sql records?

959


Is pl sql still used?

924


Explain what is dbms?

985


Can we write dml inside a function in sql server?

897


Is nosql faster than sql?

969


Define commit, rollback and savepoint?

976