Query for second maximum salary in each in each department
Answer Posted / akula
select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is compound trigger?
What is a table in a database?
What is online transaction processing (oltp)?
What is the benefit of foreign key?
Why do we use triggers?
what is a materialized view? : Sql dba
What is the difference between sql and isql*plus?
How to call shell script from pl sql procedure?
How to place comments in pl/sql?
Can we insert delete data in view?
what are string data types? : Sql dba
What has stored procedures in sql?
Why is pl sql needed?
what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba
How do you declare a variable in pl sql?