Oracle 级联更新多表

来源:互联网 发布:日本北陆大学 知乎 编辑:程序博客网 时间:2024/06/05 02:19

两表(多表)关联update – 被修改值由另一个表运算而来

update customers a -- 使用别名 set city_name=        (select b.city_name          from tmp_cust_city b          where b.customer_id=a.customer_id) where exists (select 1               from tmp_cust_city b               where b.customer_id=a.customer_id );
0 0
原创粉丝点击