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

How can you fetch common records from two tables?

589


What are the ways on commenting in a pl/sql code?

513


How can you save or place your msg in a table?

523


What operators deal with null?

607


what are the different functions in sorting an array? : Sql dba

581






What is natural join in sql?

537


What is difference between inner join and self join?

595


What is trigger and types?

562


What is a mutating table and a constraining table?

575


What is schema in sql example?

597


how to create a test table in your mysql server? : Sql dba

496


What are different types of statements supported by sql?

609


Explain ddl statements in pl/sql?

578


What is cte sql?

517


Can a table contain multiple foreign key’s?

575