Skip to content

Instantly share code, notes, and snippets.

@luisfc
Last active June 5, 2017 20:01
Show Gist options
  • Save luisfc/14c2e610ed890ecb2afcb20b2be9fd2b to your computer and use it in GitHub Desktop.
Save luisfc/14c2e610ed890ecb2afcb20b2be9fd2b to your computer and use it in GitHub Desktop.
Copy data of one table to another table
INSERT INTO table2 SELECT * FROM table_origin;
INSERT INTO table2 (field1, field2) SELECT table_origin.field1, table_origin.field2 FROM table_origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment