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 1st, 2nd, 3rd highest using select select
statement not using rownum

Answer Posted / madhavi

SELECT sal
FROM (SELECT sal, RANK() OVER(ORDER BY sal DESC) AS rnk
FROM emp)
WHERE rnk IN (1,2,3);

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of log option in exp command.

1127


What do you understand by a database object? Can you list a few of them?

1021


How to increment dates by 1 in oracle?

1102


What is oracle server autotrace in oracle?

1171


How to run the anonymous block again?

1139


How remove data files before opening a database?

1080


How to assign a tablespace to a users in oracle?

1050


how to use select statement as formal parameter in procedure specification?(someone said that using string) ex:-procedure(a in number,select ename from emp ) i am asking syntax like this?

2017


what is a Nested Loop join?

2123


How to convert character types to numeric types?

1141


What is oracle data type?

973


How to convert characters to dates in oracle?

1107


How do I know if oracle is installed on windows?

940


How to get last row id?

1007


What happens to the current transaction if the session is ended?

1102