Oracle兩表之間資料更新

suyunlong發表於2017-09-01
UPDATE AMC_FAX_ADDRESS_LIST AFAL
   SET (FAX1, FAX2, TEL1, TEL2) =
       (SELECT BFI.LXR_FAX, BFI.JBR_FAX, BFI.LXR_TEL, BFI.JBR_TEL
          FROM BASE_FAXLIST_INFO BFI
         WHERE BFI.FAXID = AFAL.UUID)
 WHERE EXISTS
 (SELECT 1 FROM BASE_FAXLIST_INFO BFI WHERE BFI.FAXID = AFAL.UUID);

相關文章