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 ?

Answers were Sorted based on User's Feedback



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

Answer / braulio

-- that's it

select * from
(select max(salary) from salary)
where rownum = 2

Is This Answer Correct ?    0 Yes 1 No

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

Answer / bhamidipati srinivas

select (select max(gross) from employee_dtls),(select max
(gross) as nextmaximum
from employee_dtls where gross<(select max(gross) from
employee_dtls)) from dual

Is This Answer Correct ?    2 Yes 4 No

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

Answer / sdfsfsdf

to install .sh files(.exe files)in linux.copy the file
inusr.
open terminal go to usr and type bash ./follwed by file name
(can use tab key)
here.
to unistall java in linux we can use rm command

Is This Answer Correct ?    1 Yes 4 No

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

Answer / naveen

select sal from employee where sal >= (select max(sal) from
employee where sal not in (select max(sal) from employee))

Is This Answer Correct ?    7 Yes 14 No

Post New Answer

More Oracle General Interview Questions

A and B are tables. x is a column. Then What is difference between A.x = B.x(+) and A.x = B.x ?

7 Answers   Cognizant, IBM,


In Oracle Applications We are Using Sub Ledger Accounting. When we Transfer the Data all modules (AP,AR,CE,FA) to SLA We done Some customizations? What are They??

0 Answers  


Is it possible to disable the parameter from while running the report ?

1 Answers   Honeywell, Oracle,


pls explain connect by prior with example and its real time use

3 Answers  


What is a proxy class?

0 Answers  


What happens if you set the sga too low in oracle?

0 Answers  


How many types of tables supported by oracle?

0 Answers  


How to loop through data rows in the implicit cursor?

0 Answers  


How to initialize variables with default values?

0 Answers  


How to use "while" statements in oracle?

0 Answers  


What is merge in oracle?

0 Answers  


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

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)