ORACLE中将一个值赋值到另一个表的值

转自: http://www.cnblogs.com/mybi/archive/2012/06/04/2535274.html  


update tmp_customer_list t
set email = (select email from tmp_etl_customerlist e where t.mobile = e.mobile);

更加高效的方法:(将表CUSTOMER_LIST_TMP01中的值customerlevel赋值到customer_list中,满足的先决条件是 t.customerkey = t1.customerkey)

merge into  customer_list t

using CUSTOMER_LIST_TMP01 t1

on(t.customerkey = t1.customerkey)

when matched then update set t.customerlevel = t1.customerlevel ;

commit;






发布了53 篇原创文章 · 获赞 13 · 访问量 38万+

猜你喜欢

转载自blog.csdn.net/honghuajun/article/details/8216403