update tabel1 t1 set column5 = t2.column1, column2 = 0
from table1 t
join table2 t2 on t2.column3 = t.column3
left join table3 t3 on t3.coulmn4 = t.column4
where t3.column5 is null
update tabel1 t1 set column5 = t2.column1, column2 = 0
from table1 t
join table2 t2 on t2.column3 = t.column3
left join table3 t3 on t3.coulmn4 = t.column4
where t3.column5 is null
1条答案
按热度按时间pkln4tw61#
如手册所述:
除非打算自联接,否则不要将目标表作为from\项重复
因此,不要重复from子句中的目标表: