Query to get max and second max in oracle in one query ?
Answer Posted / ajit
select max(sal),1 no
from emp
union
select sal,rn from (select sal,rownum rn from emp)
where rn = 2
order by 1 desc;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is oracle update statement with inner join ?
In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col
Iam learning oracle developer 2000.. can anyone give me then tutorials sites or PDF related to developer 2000 please send me the details @ mak2786@gmail.com thanks Arun
List out the difference between commit, rollback, and savepoint?
What is the max number of columns in an oracle table?
What is recovery manager in Oracle?
What is the relation of a user account and a schema?
Who developed oracle & when?
How to install oracle database 10g xe?
Explain what are the uses of rollback segment?
What are operators in oracle?
How many types of auditing in Oracle?
What is bulk copy or bcp in oracle?
What do you understand by database schema and what does it hold?
What is primefaces used for?