T-SQL: UPDATE query

Table1
---------
PK int
Table2ID nvarchar
Column3 nvarchar

Table2
---------
PK int
Table2ID nvarchar
Column7 nvarchar

Have to update rows in Table1.Column2 with matching values from Table2.Column7.
Matching done using Table2ID not numeric column.

Thanks!
quasar_eeAsked:
Who is Participating?
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
UPDATE Table1
SET Table1.Column2 = Table2.Column7
FROM Table1
   JOIN Table2 ON Table1.table2ID = Table2.Table2ID
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.