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

What is a sql trace file?

550


How do you select unique values in sql?

501


What is the example of procedure?

525


Is sql between inclusive?

590


how to escape special characters in sql statements? : Sql dba

518






What pl/sql package consists of?

638


Can we rollback after truncate?

565


what is 'mysqlimport'? : Sql dba

573


What is t-sql? : Transact sql

542


What is localdb mssqllocaldb?

622


Why do we use sql constraints? Which constraints we can use while creating database in sql?

549


what are set operators in sql? : Sql dba

536


What is a sql*loader control file?

620


Show how functions and procedures are called in a pl/sql block.

588


Sql technical questions

777