Updating one table with data from another table
For MySql:
UPDATE table1 JOIN table2
ON table1.id = table2.id
SET table1.firstname = table2.firstname,
table1.`lastname` = table2.`lastname`
For Sql Server:
UPDATE table1
SET table1.firstname = table2.firstname,
table1.[lastname] = table2.[lastname]
FROM table1 JOIN table2
ON table1.id = table2.id