Query to get max and second max in oracle in one query ?
Answer Posted / mehul
select max(sal) from emp where sal not in ( select max(sal)
from emp)
| Is This Answer Correct ? | 29 Yes | 12 No |
Post New Answer View All Answers
What are the various oracle database objects?
Give the constructs of a package, function or a procedure.
What is the difference between a hot backup and a cold backup in oracle?
What are set operators?
What is BBED in Oracle?
Please explain oracle data types with examples?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
Explain an exception?
What is procedure overloading in oracle?
How do you tell what your machine name is and what is its IP address?
What is the difference between formal parameters and actual parameters?
What are triggers in oracle?
1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.
How to define an oracle cursor variable?
What is the difference between Delete, Truncate and Drop in Oracle?