oracle、sql server Join连表修改。

1、Oracle 连表修改

merge into t_user t1
using (select * from t_class) t2
on(t1.userId=t2.userId)
when matched then
update set t1.name=t2.name

2、Sql server 连表修改

UPDATE b SET b.ProductSN=p.productsn  FROM t_user b
INNER JOIN t_student p ON b.MainSN=p.MainSN

 

posted @ 2023-11-29 17:50  好学Ace  阅读(39)  评论(0编辑  收藏  举报