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 / vijay kintali

select e1.ename,e1.sal from emp e1 where n=(select count
(distinct e2.sal) from emp e2 where e1.sal<=e2.sal);

Note:n here is nth highest salary.......

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you update sql?

981


What is nosql vs sql?

1179


What are inner outer left and right joins in sql?

1016


What is the difference between left join and right join?

946


How to get unique records from a table?

973


how to convert character strings to dates? : Sql dba

1063


What are expressions?

1015


What are the two types of exceptions.

1171


how to drop an existing view in mysql? : Sql dba

1061


Write the command to remove all players named sachin from the players table.

1184


What is difference between table and view?

1057


differentiate between float and double. : Sql dba

1060


What is the process of debugging?

1070


What are the different set operators available in sql?

1026


Does sap use sql?

996