日期:2014-05-17 浏览次数:20495 次
update a表 set value=b.value
from a表
left join b表 on a.pid=b.pid
update a表 set value=b.value
from a表
inner join b表 on a.pid=b.pid
UPDATE A
SET A.VALUE = a.vlaue + b.value
FROM tableA a
INNER JOIN tableB b
ON a.pid = b.pid
UPDATE A
SET A.VALUE = a.vlaue + b.value
FROM tableA a
INNER JOIN (SELECT pid, value=SUM(value) FROM tableB) b
ON a.pid = b.pid