--goal: update selected columns with join (postgres)--
UPDATE table1 t1 SET column1 = 'data'FROM table1 RIGHT JOIN table2 ON table2.id = table1.id WHERE t1.id IN (SELECT table2.id FROM table2 WHERE table2.column2 = 12345)