Skip to main content

There are many situations when it is needed to update one table from another table with SQL. We're providing the way we use all the time and it is also clear for understanding even for SQL beginners.

Here is the SQL code for updating one table from another table, just replace table and column names:

UPDATE t1
SET Column1 = t2.Column1
FROM Table1 t1 INNER JOIN Table2 t2
ON t1.Column2 = t2.Column2
WHERE t1.Column3 = 'something'

- Advertisement -
- Advertisement -