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 an inner join sql?

1028


what is the difference between rownum pseudo column and row_number() function? : Sql dba

1079


Explain some predefined exceptions.

1035


What are the usages of sql?

1058


How to select all records from the table?

1136


Why is theta join required?

1145


Explain what is sql*plus?

1141


how to create a table index in mysql? : Sql dba

1061


What is coalesce sql?

997


What is synonyms?

1057


What is sharding in sql?

984


Write a sql select query that only returns each name only once from a table?

1012


What are the commands used in sql?

1079


How many sql statements are used?

1010


how many sql dml commands are supported by 'mysql'? : Sql dba

1120