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 do you select unique values in sql?

1049


How can I speed up sql query?

1008


What is the difference between distinct and unique in sql?

993


what is the difference between a web-garden and a web-farm? : Sql dba

1145


What are views in sql?

1037


what is index? : Sql dba

1045


What does sql stand for?

1055


How do I start pl sql?

998


How many types of literals are available in pl sql?

1167


What is primary key and foreign key with example?

984


What is cursor in pl sql?

1188


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

1057


What is difference between stored function and application function?

1291


What is a null value?

1191


How exception handling is done in advance pl/sql?

1024