find the second highest salary of the emp table

Answer Posted / ramesh.ch

select max(salary) from emp
where salary< ( select max(salary) from emp)


explanation::

first sub query returns maximum salary of employee
than main query returns maximum salary lessthan the maximum
salary return by subquery

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to load excel data sheet to oracle database

590


How many types of synonyms in Oracle?

601


HI Friends Myself Manoj,i am from bengaluru.i have 1 yr of exp in PLSQL but not upto the mark..now attending interviews but m not able to clear even 1 round..i have attended 3 interviews till today.purpose of writing this query is,i want to know the intreview topics that interviewer going to ask frequently,mainly SCENARIO based questions.IF anybody have any PLSQL projects please give it to me,it will helps me alot.Thanks for your patience.

998


Explain the features of oracle?

602


Explain temporal data types in oracle

611






How would you best determine why your MVIEW couldnt FAST REFRESH?

1438


How to insert a new row into a table in oracle?

593


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

635


Why should I use oracle database?

576


How do you find out from the RMAN catalog if a particular archive log has been backed-up?

1661


What are the different types of trigger and explain its various uses and functions?

553


What is a subquery in oracle?

580


How to turn on or off recycle bin for the instance?

611


Differentiate between post-database commit and post-form commit?

545


What are the logical operations?

677