Skip to content

Instantly share code, notes, and snippets.

@fsuuaas
Last active August 28, 2018 12:05
Show Gist options
  • Select an option

  • Save fsuuaas/858a976cf726b0b7649bb1ce31ce93a4 to your computer and use it in GitHub Desktop.

Select an option

Save fsuuaas/858a976cf726b0b7649bb1ce31ce93a4 to your computer and use it in GitHub Desktop.
UPDATE table_name1
SET column1 = (
SELECT column2
FROM table_name2
WHERE table_name1.id = table_name2.id
);
UPDATE `table` SET test=number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment