Home > DeveloperSection > Forums > Copy Data from one Table to another
sandy taylor
sandy taylor

Total Post:46

Points:324
Posted on    October-17-2010 1:39 PM

 MSSQL Server MSSQL Server 
Ratings:


 1 Reply(s)
 1282  View(s)
Rate this:
Copy all records data from Table1 into Table2 matching on the ID.
Don't know how to write the query to make this happen. Can anyone help?
Thanks!
Sandy


Uttam Misra

Total Post:124

Points:888
Posted on    October-18-2010 4:25 AM

UPDATE Table1

SET Table1.ID = Table2.ID

FROM Table1

INNER

JOIN Table2

ON Table2.ID = Table1.ID


Don't want to miss updates? Please click the below button!

Follow MindStick