Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to update salary of employees department wise?

Answers were Sorted based on User's Feedback



How to update salary of employees department wise?..

Answer / 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

How to update salary of employees department wise?..

Answer / 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

How to update salary of employees department wise?..

Answer / manoranjan sethy

UPDATE EMP
SET SAL=DECODE (
DEPTNO,
10, SAL+SAL*0.1,
20, SAL+SAL*0.2,
30, SAL+SAL*0.3,
40, SAL+SAL*0.4,
'NA'
)
/

Is This Answer Correct ?    6 Yes 0 No

How to update salary of employees department wise?..

Answer / prativa mishra

update employees
set salary=salary+1000
where department_id=&department_id

Is This Answer Correct ?    4 Yes 3 No

How to update salary of employees department wise?..

Answer / 8008064637

begin
updata emp set sal=sal+1000 where deptno in(10,20,30,40);
end;

Is This Answer Correct ?    4 Yes 4 No

How to update salary of employees department wise?..

Answer / 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

More SQL PLSQL Interview Questions

What is PL/SQL table ?

6 Answers  


what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

0 Answers  


How to fetch records from a partitioned table?

2 Answers   HSBC,


what are the differences between require and include, include_once and require_once? : Sql dba

0 Answers  


How many indexes can be created on a table in sql?

0 Answers  


can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba

0 Answers  


What are the cursor attributes used in PL/SQL ?

4 Answers  


explain what is mysql? : Sql dba

0 Answers  


what is a materialized view? : Sql dba

0 Answers  


What does “select count(1) from tab” result?

10 Answers   IBM,


What is sql partition?

0 Answers  


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

0 Answers  


Categories