SQL: Update with values from another table

UPDATE Log
SET Username = u.Username, Name = u.Name
FROM Users u
Where u.Id = userid

Source: codesnippets.joyent.com

Advertisements