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...

find out the third highest salary?

Answer Posted / harmeet

Hi, this query will gives the third highest salary from table

select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);

To dispay 5th highest salary, just change the number 3 to 5.
Like that we can find top N salaries.

I hope i'm not wrong.

Is This Answer Correct ?    44 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State any two functions of oracle?

1097


How do I spool to a csv formatted file using sqlplus?

1088


what is IDE,DMV in sql server?

2880


How to rename a tablespace in oracle?

1127


How to fetch the row which has the max value for a column?

1045


Does oracle database need java?

1068


What is rich query?

1036


How many categories of data types in oracle?

1074


how can db_files > maxdatafiles since db_files is for instance and the later is for database

2675


What happens if variable names collide with table/column names?

1265


what is dynamic SGA and static SGA

4488


What is bulk copy or bcp in oracle?

1184


What are the differences between primary key and unique key?

1061


What is a cursor variable?

1215


Explain the importance of .pll extension in oracle?

1058