1.update tab a set a.name=(select b.name from b where a.id=b.id) where exists (select 1 from b where a.id=b.id)

2.merge into tab using ()  on (条件) when matched then do update when no matched then do insert

3.update(select a.name,b.name from a,b where a.id=b.id) set a.name=b.name      

 

引用地址:http://blog.csdn.net/lenovouser/article/details/17088933

posted on 2017-06-20 11:50  yeahdwb  阅读(95)  评论(0)    收藏  举报