Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / satish

select rownum,employee_id,first_name,max(salary) from
employees
group by rownum,employee_id,first_name
having rownum<=2
order by rownum

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I view a procedure in sql?

552


What has stored procedures in sql and how we can use it?

571


What are the properties of a transaction?

573


What's the difference between inner join and left join?

518


What will you get by the cursor attribute sql%found?

540






What is faster join or subquery?

514


Which are the different character-manipulation functions in sql?

550


explain the options of myisamchk to improve the performance of a table. : Sql dba

549


What is difference between my sql and sql?

532


What problem one might face while writing log information to a data-base table in pl/sql?

560


what are the 'mysql' command line options? : Sql dba

561


What is cold data?

507


Which join is default?

526


How do you drop a trigger?

544


what are the advantages a stored procedure? : Sql dba

553