Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A decode statement

GeetaMMay 19 2012 — edited May 19 2012
can you please give me the single decode statement for the below update statements -
update emp_company
set salary - 100
where ename = 'vijay';

update emp_company
set salary + 100
where ename = 'sunil';
I tired below but all the rows in the table are getting updated -
update emp_company
set salary = decode(ename,'vijay',salary-100,'sunil',salary+100);
Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2012
Added on May 19 2012
6 comments
181 views