Query to get max and second max in oracle in one query ?
Answer Posted / satish
SELECT SAL SECOND_MAX_SAL FROM (SELECT SAL,DENSE_RANK() OVER(ORDER BY SAL DESC) RANK FROM EMP) WHERE RANK=2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you know about normalization? Explain in detail?
What exactly do quotation marks around the table name do?
What is proxy method?
What language does oracle use?
How many data types are supported?
What is meant by raw datatype?
How to Truncate Table in Oracle
What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?
What is a system tablespace?
What is index-organized table in Oracle?
How to create a new oracle data file?
What is a cursor and what are the steps need to be taken?
What is coalesce function?
When do you get a .pll extension in oracle?
Calculate difference between 2 date / times in oracle sql?