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 are the advantages of oracle 12c?

544


How to create additional tablespaces for an new database?

561


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

1428


What are the differences between date and timestamp in oracle?

547


Explain the use of rows option in imp command.

600






How to use "in out" parameter properly?

607


How do you bind variables in oracle?

535


Give the various exception types.

536


ABOUT IDENTITY?

1553


Is java required for oracle client?

541


What are the different pseudo commands? Explain in general?

534


Explain the use of grant option in exp command.

576


How to create a table index?

552


What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?

1515


Can we use bind variables in oracle stored procedure?

480