UPDATE A SET (A1, A2, A3) = (SELECT B1, B2, B3 FROM B WHERE A.ID = B.ID) WHERE ID IN (SELECT B.ID FROM B WHERE A.ID = B.ID)