Skip to content

Instantly share code, notes, and snippets.

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 miklblitz/439ccc922629b97f4aad56215dea478a to your computer and use it in GitHub Desktop.
Save miklblitz/439ccc922629b97f4aad56215dea478a to your computer and use it in GitHub Desktop.
UPDATE need_to_update
INNER JOIN original ON need_to_update.id = original.id
SET need_to_update.field1 = original.field1,
need_to_update.field2 = original.field2,
need_to_update.field3 = original.field3,
...
WHERE condition(ex: original.updated_at like '2020-02-09%');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment