Thursday, November 21, 2019

Oracle: update one table with joined condition from another table


UPDATE table1 
       SET t1_col1 = 'something'
       WHERE id IN (SELECT t1.id FROM table1 t1, table2 t2
                                 WHERE t1.id = t2.id
                                 AND t2.t2_col1 = 'some condition');

No comments:

 
Get This <