Update Statement Between Two Tables

"T1" is the table having the fields of id and name. There is another table "T2" having id and PetName with some additional information. Now to update "T1".name with "T2".PetName.
Update query is as follows(condition between two tables),
update T1 set t1.name = T2.PetName
from T2
where T1.id = T2.id

No comments: