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 retrieve the top 3 salaries of the table using rownum

Answer Posted / nitesh

select sal from emp e where 3>=(select count(distinct sal)
from emp where sal>e.sal) order by sal desc;

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is data stored in sql?

1001


How you improve the performance of sql*loader? : aql loader

955


Can we update views in sql?

897


What is the difference between drop and truncate commands?

997


What is sql keyword?

944


Explian rowid, rownum? What are the psoducolumns we have?

945


What is mutating trigger?

968


What is oracle and pl sql?

1079


Is id a reserved word in sql?

1090


What are different functions in sql?

897


what is acid property in database? : Sql dba

960


Define union, minus, union all, intersect ?

949


What is the difference between inner join and left join?

937


What is rownum in sql?

964


Is sql developer case sensitive?

943