Skip to content

Instantly share code, notes, and snippets.

@adamo
Created November 13, 2019 10:40
Show Gist options
  • Save adamo/55db9ba50d77c2cbb9023cee77b03841 to your computer and use it in GitHub Desktop.
Save adamo/55db9ba50d77c2cbb9023cee77b03841 to your computer and use it in GitHub Desktop.
Select data from one table to another matching
UPDATE table_a INNER JOIN table_b ON table_a.column_to_match = table_b.column_to_match
SET table_a.column_to_update = table_b.data_column_to_update_with
WHERE table_a.column_match_a = table_b.column_match_for_example_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment