1UPDATE mytable t -- Update using WITH statement
2SET value3 = (
3 WITH comp AS (
4 SELECT id, value1
5 FROM mytable t
6 WHERE value2 > 10
7 )
8 SELECT c.value1
9 FROM comp c
10 WHERE c.id = t.id
11);
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';