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

What is #table in sql?

1180


what are the type of locks ? : Sql dba

1008


define sql delete statement ? : Sql dba

1068


What is the difference between subquery and correlated query?

1113


Why does sql need a server?

1083


How can I delete duplicate rows?

1063


What are the rules to be applied to nulls whilst doing comparisons?

1367


What is sqlexception in java?

1036


What is cursor explain with example?

1028


Can we create table in function?

1018


Why do we need cursor in pl sql?

1187


Why is a primary key important?

1104


Why do we create views in sql?

1217


Explain character-manipulation functions?

1174


What is a sql schema used for?

1153