Query to get max and second max in oracle in one query ?
Answer Posted / amit golia
SELECT min(sal) FROM(SELECT DISTINCT(sal) FROM emp ORDER
BY sal DESC) WHERE ROWNUM<=2;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain a private synonyms?
What is the difference between post-database commit and post-form commit?
What happens to the current transaction if the session is killed?
What is ceil and floor in oracle?
Design database draw er diagram for a certain scenario ?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
What is oracle database 10g express edition?
Difference between pre-select and pre-query
Explain oracle instance.
What are the execution control statements?
What is the difference between PFILE and SPFILE in Oracle?
Explain an index?
How does the on-delete-cascade statement work?
What are the ways tablespaces can be managed and how do they differ?
does the query needs a hint to access a materialized view?