In this article, we going to learn how to update a table with join another table in SQL Server. Let says we have two products table as below.
We are going to update the Product table based on the data we have from the Main Product Table. Both tables are joined by Id.
Here is the full TSQL Query to update a table with join another table in SQL Server.
UPDATE P SET P.Name = MP.Name, P.Price = MP.Price, P.SKU = MP.SKU FROM Products P INNER JOIN MainProducts MP ON P.Id = MP.Id