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
浙公网安备 33010602011771号