如果两个表中都有一个“公共键列”,并且此键列在两个表中具有相同的值(它们在两个表中引用相同的行),则下面的查询应该起作用:
UPDATe Table1SET Column1 = t2.Column1FROM Table2 t2 INNER JOIN Table1 t1 ON t2.KeyColumn = t1.KeyColumn
编辑:
UPDATe Table3 SET uploadYearModel = t1.yearModel FROM Table1 t1 INNER JOIN Table2 t2 ON t2.imgid = t1.imgid INNER JOIN Table3 t3 ON t3.uploadId = t2.uploadId
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)