Skip to content

Instantly share code, notes, and snippets.

@AlexMcowkin
Created May 21, 2015 09:37
Show Gist options
  • Save AlexMcowkin/5f7a62dfb51daa33c8eb to your computer and use it in GitHub Desktop.
Save AlexMcowkin/5f7a62dfb51daa33c8eb to your computer and use it in GitHub Desktop.
SQL: create copy of table
CREATE TABLE table_new LIKE databasename.table_old;
INSERT table_new SELECT * FROM databasename.table_old;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment