How to update salary of employees department wise?

Answer Posted / meher.shareen

begin
update emp set sal=sal+1000
where deptno=10;
update emp set sal=sal+2000
where deptno=20;
update emp set sal=sal+3000
where deptno=30;
update emp set sal=sal+4000
where deptno=40;
end;

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we join more than 2 tables in sql?

678


How do I delete a trigger?

723


What is assignment operator in pl sql?

764


What is union?

815


Explain what is a database?

815






Name the different types of indexes in sql and define them.

782


What is file based approach?

663


Is keyword pl sql?

732


What are the types of subqueries?

768


explain commit and rollback in mysql : sql dba

731


what is primary key? : Sql dba

710


How do I upgrade sql?

738


Where the sql database files are stored?

692


what are the join types in tsql? : Transact sql

755


- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?

1581