Oracle-update multiple row value where the the id column equals specific values -
i new in oracle , want update multiple row value column id = 1 , 2
.
i tried :
update tester set employee_phone_number = ( 0789456123,0789456321) employee_id in (1,2);
but gives me "missing right parenthesis"
any please , in advance.
another approach:
merge tester using ( select 1 id,'0123456785' employee_phone_number dual union select 2 id,'0123456786' employee_phone_number dual) new_values on ( tester.id = new_values.id) when matched update set employee_phone_number = new_values.employee_phone_number;
more words, allows values specified in 1 place , extends allow inserts id not exist.
Comments
Post a Comment