Skip to content

Instantly share code, notes, and snippets.

@DomPixie
Forked from DominicWatts/mysql-copy-table-syntax
Created November 22, 2021 21:11
Show Gist options
  • Save DomPixie/24c95cda5bf77203470ed32c313a9352 to your computer and use it in GitHub Desktop.
Save DomPixie/24c95cda5bf77203470ed32c313a9352 to your computer and use it in GitHub Desktop.
mysql copy table syntax
CREATE TABLE IF NOT EXISTS new_table LIKE existing_table;
INSERT new_table SELECT * FROM existing_table;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment