Query to get max and second max in oracle in one query ?

Answer Posted / mehul

select max(sal) from emp where sal not in ( select max(sal)
from emp)

Is This Answer Correct ?    29 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to filter out duplications in the returning rows using oracle?

652


How to create a testing table in oracle?

558


what is the dual table in oracle?

562


What is a cursor and what are the steps need to be taken?

605


What are triggers in oracle?

571






How to do clean up if create database failed?

584


Is there a function to split a string in plsql?

576


how to clone 9i Database on to 10g Database.

1835


What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar

3841


How to assign a table row to a record variable?

590


Describe an oracle table?

582


How to define an oracle sub procedure?

608


State all possible different index configurations a table can possibly have?

580


What is logical backup in oracle?

582


Name the three major set of files on disk that compose a database in Oracle?

642