Query to get max and second max in oracle in one query ?
Answer Posted / samir kumar sahoo
SELECT sal FROM(SELECT DISTINCT(sal) FROM employees ORDER
BY sal DESC) WHERE ROWNUM<=2;
| Is This Answer Correct ? | 23 Yes | 2 No |
Post New Answer View All Answers
What is a static data dictionary in oracle?
What is the maximum limit on the number of columns in a table?
What is max rowid in oracle?
How to drop an index in oracle?
List out the types of joins.
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
Explain cascading triggers.
Can multiple cursors being opened at the same time?
Is the After report trigger fired if the report execution fails ?
What happens if you lost a data file?
Why should I use oracle database?
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
Can a formula column referred to columns in higher group ?
Explain the blob datatype?
Can we use oracle pl/sql block in core java? if so how? pls get back to me .....