How to update salary of employees department wise?

Answer Posted / k v koteswara rao

UPDATE employees SET salary=DECODE(department_id,10,salary+1000,20,salary+2000,30, salary+3000,salary);

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

560


Can we call stored procedure in function?

552


What is the usage of when clause in trigger?

570


What is pl sql record in oracle?

565


Can we join more than 2 tables in sql?

493






what is csv? : Sql dba

578


What is foreign key in sql with example?

515


What is pl/sql table? Why it is used?

564


Does sap use sql?

517


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

1644


Can we update views in sql?

535


what tools available for managing mysql server? : Sql dba

535


What does closing a cursor do?

766


Explain scalar functions in sql?

586


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

620