Query for second maximum salary in each in each department

Answer Posted / sureshramsing

select * from(select row_number() over(partition by deptno order by sal desc) rn,a.* from emp a) where rn=1;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does select count (*) mean in sql?

540


Why is sql important?

575


What does an inner join do?

551


What is a trigger in sql?

634


Why stored procedure is better than query?

502






If a cursor is open, how can we find in a pl/sql block?

667


Does google use sql?

506


How to disable a trigger name update_salary?

667


What is use of package in pl sql?

528


How many types of tables are there?

496


What is posting?

596


How do I delete a trigger?

535


how to increment dates by 1 in mysql? : Sql dba

539


Which is faster view or stored procedure?

497


what is innodb? : Sql dba

569