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)
SET A.OR_ID=(SELECT code
FROM B
WHERE B.ID=A.OR_ID)