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

What is union and union all keyword in sql and what are their differences?

1100


Explain the purpose of %type and %rowtype data types with the example?

988


Is progress software supports to ( pl/sql )?

1034


What company owns postgresql?

1026


Why is partition used in sql?

1122


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

1147


What are the types of keys?

991


How would you pass hints to the sql processor?

980


What is update query?

977


Is truncate ddl or dml?

991


what are the types of join and explain each? : Sql dba

1037


How do I write a sql query in pgadmin 4?

972


What's the difference between a primary key and a clustered index?

986


What are triggers in sql?

1017


What does stand for in sql?

964