從其他DB取得資料並更新到目的TABLE

update tableA  --target table
set(
tid,
tname
)=
(
select TB.prodId, TB.ProdName  --source data
from tableB TB
where TB.id = 123456
)
where tag = 'tag123'  --target table condition
arrow
arrow
    文章標籤
    SQL UPDATE
    全站熱搜

    咪卡恰比 發表在 痞客邦 留言(0) 人氣()