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