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 use distinct and group by together?

606


Why do we need pl sql?

560


what is a foreign key ? : Sql dba

620


What is self-join and what is the requirement of self-join?

648


Enlist the characteristics of pl/sql?

1261






what are ddl statements in mysql? : Sql dba

589


What is scalar and vector?

544


What are different types of indexes?

522


what are the types of join and explain each? : Sql dba

542


What is acid property in a database?

595


How do I order columns in sql?

539


What is sqlca in powerbuilder?

582


What are all the different types of indexes?

631


What is difference between db2 and sql?

543


What are the different types of sql commands?

614