mysql 与 oracle 的连表update

mysql:

update 表A a,表B b
set
a.xx=b.xx
where
a.id=b.id;

oracle

update 表A set a.xx=(select b.xx from 表B where a.id = b.id)
where exists(select 1 from b.xx  where a.id = b.id)

 

posted @ 2019-01-03 20:02  正义的伙伴1994  阅读(254)  评论(0编辑  收藏  举报