多个表关联update
多个表关联update
eg:
UPDATE table1 t1 SET fieldname1 = t2.fieldname1, [fieldname2 = t2.fieldname2]
FROM table2 t2
WHERE t1.Id = t2.Id and t1.Id='2222'
等同:
UPDATE table1 t1 SET (fieldname1,fieldname2) =(
select fieldname1,fieldname2
from
原创
2021-05-21 11:09:26 ·
89 阅读 ·
0 评论