Query to get max and second max in oracle in one query ?
Answer Posted / subodh tiwari
SELECT ENAME,SAL FROM (SELECT ENAME,SAL FROM EMP ORDER BY
SAL DESC) WHERE ROWNUM<=2
| Is This Answer Correct ? | 15 Yes | 9 No |
Post New Answer View All Answers
How to loop through data rows in the implicit cursor?
How to assign a table row to a record variable?
What are the different types of modules in oracle forms?
Using the relations and the rules set out in the notes under each relation, write table create statements for the relations EMPLOYEE, FIRE and DESPATCH. You should aim to provide each constraint with a formal name, for example table_column_pk.
What is max rowid in oracle?
How to get a list of all user accounts in the database?
What are group functions in oracle?
What is columnar storage what is the advantage?
What is blob datatype?
What do you mean by cdb and pdb in oracle 12c?
In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?
What are ddl statements in oracle?
how to do daily transactions with out sql* loader control file regesterd in apps?
How to export data to a csv file?
How to see the table columns used in an index?