1UPDATE A
2SET foo = B.bar
3FROM TableA A
4JOIN TableB B
5 ON A.col1 = B.colx
6WHERE ...
1UPDATE
2 t1
3SET
4 t1.c1 = t2.c2,
5 t1.c2 = expression,
6 ...
7FROM
8 t1
9 [INNER | LEFT] JOIN t2 ON join_predicate
10WHERE
11 where_predicate;
12
1 UPDATE
2 first_table ft
3 JOIN second_table st ON st.some_id = ft.some_id
4 JOIN third_table tt ON tt.some_id = st.some_id
5 .....
6 SET
7 ft.some_column = some_value
8 WHERE ft.some_column = 123456 AND st.some_column = 123456
9
1UPDATE t1
2SET t1.COL1 = t2.COL1, t1.COL2 = t2.COL2
3FROM MY_TABLE AS t1
4JOIN MY_OTHER_TABLE AS t2 ON t1.COLID = t2.ID
5WHERE t1.COL3 = 'OK';
1UPDATE D
2SET D.Name = 'Computer Science and Engineering'
3FROM Department D
4INNER JOIN Student S ON D.Id = S.DepartmentId