[MSSQL] JOIN UPDATE

SQL 2012. 5. 4. 12:52

 

UPDATE table1

SET col2 = B.col2,

col3 = B.col3

FROM table1 as A

JOIN table2 as B

ON A.col1 = B.col1

WHERE A.col2 <> B.col2

OR A.col3 <> B.col3

 

 

 

 

[출처] [MSSQL] JOIN UPDATE|작성자 맑밝인

Posted by 요지
,