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

How to define a specific record type?

808


How to run the anonymous block again?

804


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

2035


What is the difference between $oracle_base and $oracle_home?

777


What is the difference between count (*), count (expression), count (distinct expression)?

756






What are triggers in oracle?

745


What is a read write transaction in oracle?

792


What is oracle rowcount?

806


Is rowid unique in oracle?

718


How to define a record variable to store a table row?

770


definition of cluster and non-clustered index?

2671


HI, Please let me know the syllabus for Oracle OCA and OCP Certification

2172


How to loop through a cursor variable?

772


What are joins, explain all types of joins?

1907


How to run queries on external tables?

758