Write query to fetch second maximum salary from employee table.

Answer Posted / abhishekjaiswal

select a.last_name,a.salary from employees a where 3=(select count(*) from employees b where b.salary>a.salary) order by a.salary desc.
<<<<<<<<<[N-1]>>>>>>>>>>

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is max rowid in oracle?

551


How to use subqueries with the exists operator in oracle?

604


Can you create a synonym without having a table?

545


How can we find out the current date and time in oracle?

638


what is the difference between data migration and production migration.

1803






what are the advantages of running a database in archive log mode?

1727


Name the various constraints used in oracle?

560


Why is oracle database so popular?

559


How to get maxsal , minsal, ename department wise in single query

1008


Will you be able to store pictures in the database?explain.

532


What are the different types of synonyms?

586


Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.

1499


What are the different types of failures that occur in Oracle database?

592


What is merge in oracle?

553


What is tns name?

538