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.

Revisions

  1. adamo created this gist Nov 13, 2019.
    3 changes: 3 additions & 0 deletions join_update.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    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