Skip to content

Instantly share code, notes, and snippets.

@peacefixation
Created March 17, 2020 23:42
Show Gist options
  • Save peacefixation/909b904b128182371a7a3d7122d7e643 to your computer and use it in GitHub Desktop.
Save peacefixation/909b904b128182371a7a3d7122d7e643 to your computer and use it in GitHub Desktop.
SQL insert from select
INSERT INTO table1(t1_col1, t1_col2, t1_col3)
SELECT t2_col1, t2_col2, t2_col3
FROM table2
WHERE condition = foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment