Query for second maximum salary in each in each department
Answer Posted / sampath pallerla
select distinct(a.sal) from emp a where 2=(select count(distinct(b.sal)) from emp b where a.sal<=b.sal);
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
The select into statement is most often used to create backup copies of tables or for archiving records?
Can you rollback after commit?
what are integrity rules?
What is the difference between drop and truncate commands?
What are commit, rollback, and savepoint?
What are joins in sql?
What is where clause in sql?
Which one is better subquery or joins?
What is the difference between microsoft sql and mysql?
can a stored procedure call itself or recursive stored procedure? : Sql dba
What is the usage of sql functions?
What is oracle sql called?
What is cross join example?
How do you declare a constant?
Is sql a oracle?