Skip to content

Instantly share code, notes, and snippets.

@Steven-Rose
Created February 3, 2012 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Steven-Rose/1728857 to your computer and use it in GitHub Desktop.
Save Steven-Rose/1728857 to your computer and use it in GitHub Desktop.
MySQL: Update from another table
UPDATE from_table t1, to_table t2
SET t2.field_name = t1.field_name
WHERE t2.field = t1.field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment