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

select * from emp e1 where N-1 =
(select count(distinct sal)
from emp e2
where e2.sal > e1.sal)
for Nth highest salary.

Is This Answer Correct ?    20 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to look at the current sql*plus system settings?

1149


How many times can we commit in a loop?

1020


What is view? Can we update view

1439


what is the different between now() and current_date()? : Sql dba

1022


What is a rank in sql?

963


what is 'mysqlshow'? : Sql dba

1026


Why function is used in sql?

951


what is oltp (online transaction processing)? : Sql dba

1077


discuss about myisam index statistics collection. : Sql dba

951


How do I remove duplicates in two columns?

1065


Which one is better subquery or joins?

1062


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1227


What is a temporal table?

930


what are the properties and different types of sub-queries? : Sql dba

1034


How can we debug in PL/SQL?

1136