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
What's the difference between inner join and left join?
Does sql backup shrink transaction log?
how to add a new column to an existing table in mysql? : Sql dba
what is sql profiler? : Sql dba
What is bulk compiling in pl/sql.?
What does a pl/sql package consist of?
what are aggregate and scalar functions? : Sql dba
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
how to calculate the difference between two dates? : Sql dba
How do I copy a table in sql?
how to calculate expressions with sql statements? : Sql dba
How to convert comma separated string to array in pl/sql?
Explain unique key in sql.
Can we commit in trigger?
What is sql deadlock?