使用T2表中的值替换T1表的值

描述:现在有两张表,T1由Key和Value两个字段,T2也有Key和Value两个字段

当T1中的Key在T2表中存在时,更新使用T2表中对用的Value 值替换T1中的VAlue

update A set A.Value = B.Value
from T1 as A
join T2 as B
on A.Key = B.key

posted @ 2013-09-12 00:47  cheng序员  阅读(249)  评论(0编辑  收藏  举报