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 table
2SET column_1 = new_value_1,
3 column_2 = new_value_2
4WHERE
5 search_condition
6ORDER column_or_expression
7LIMIT row_count OFFSET offset;
1UPDATE employees
2SET hire_date = (SELECT departments.start_date
3 FROM departments
4 WHERE departments.department_id = employees.department_id
5 AND departments.department_name = 'HR')
6WHERE EXISTS (SELECT *
7 FROM departments
8 WHERE departments.department_id = employees.department_id
9 AND departments.department_name ='HR');