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
How to convert characters to times in oracle?
Explain the difference between replace() and translate() functions in oracle?
Explain oracle instance.
How index is implemented in oracle database?
How to sort the query output in oracle?
How to retrieve data from an cursor to a record?
What is primefaces used for?
How to drop an existing view in oracle?
What are the advantages of oracle 12c?
What do you know about normalization? Explain in detail?
What is the usage of analyze command in oracle?
How to sort output in descending order in oracle?
What is the difference between the Oracle ODBC driver and a Microsoft ODBC (Open Database Connectivity) Driver?
What is the difference between translate and replace?
ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process