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

Query to get max and second max in oracle in one query ?

Answer Posted / shareef

select ename,empno,sal,r from(select ename,empno,sal,dense_rank() over(order by sal desc) r from emp) where r=3; ----by using dense_rank()

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of segments in Oracle?

1074


What is the parameter mode that can be passed to a procedure?

1055


Is postgres faster than oracle?

1047


Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

2069


What is oracle in java?

977


What is a static data dictionary in oracle?

1118


How to specify default values in insert statement using oracle?

1112


What is an oracle recycle bin?

1012


What is the scope of a local variable?

1068


Is there a combination of "like" and "in" in sql?

1070


What is translate in oracle?

1101


what is a Nested Loop join?

2120


How many types of auditing in Oracle?

1037


How to select an oracle system id (sid)?

1065


From the following identify the non schema object: packages, triggers, public synonyms, tables and indexes.

1070