CodesJava

Easy learning with example program codes

how to update with select subquery in sql server


UPDATE table1
SET Column1 = i.Column1 , 
    Column2 = i.Column2  
FROM (
    SELECT ID, Column1, Column2
    FROM table2) i
WHERE 
    i.ID = table1.ID

Related topics

Posted in SQL   


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap