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

Is oracle a relational database?

871


what is reindexing?

1611


How to convert numbers to characters in oracle?

971


How to commit the current transaction in oracle?

1047


What is parameterized cursor in oracle?

1067


What are the different pseudo commands? Explain in general?

1022


Can we connect to ORACLE db using Windows Authentication?

1183


Why is oracle database so popular?

949


How to execute a stored program unit?

1005


Explain about your project and its relation to the current job position you are applying to?

945


How to get a create statement for an existing table?

908


What is a schema in oracle?

968


Explain drop constraint oracle?

991


is there a tool to trace queries, like profiler for sql server?

1078


What does sharding mean?

946