SQL Update From One Table To Another Based On a ID Match


Here is the command for SQL update column with value from another table


UPDATE
t1
SET
     t1.Column = t2.Column,
FROM
     TableOne t1
     INNER JOIN TableTwo t2
     ON t1.Column = t2.Column;
Go

Comments

Popular posts from this blog

Top 5 AI Tools Every Developer Should Use to Boost Coding Efficiency

How To Generate Random Dates Between Two Date Range in SQL Server

Find the number of columns in a table