Oracle multi-table association and batch modification

Description: A table has id, or_id fields, B table has id, code fields
 
Table A has or_id associated with the id of table B. Now replace A.or_id with B.code data
 
 UPDATE  A
SET A.OR_ID=(SELECT  code 
                   FROM  B
                   WHERE B.ID=A.OR_ID) 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326570611&siteId=291194637