How to update salary of employees department wise?

Answer Posted / ajit nayak

update emp
set sal = case Deptno when 10 then 1000
when 20 then 2000
when 30 then 3000
else 0
end;

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is partition in sql query?

723


How can we implement rollback or commit statement in a trigger?

789


What are the syntax and use of the coalesce function?

775


Can we call dml statement in function?

765


Which command is used to delete a package?

773






What is embedded sql what are its advantages?

691


What is microsoft t sql?

678


Describe sql comments?

728


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1000


What is dbo in sql?

706


what are the join types in tsql? : Transact sql

755


how to convert character strings to numeric values? : Sql dba

771


Can we rename a column in the output of sql query?

727


What is primary key secondary key alternate key candidate key?

765


What do you understand by pl/sql packages?

768