Skip to content

Instantly share code, notes, and snippets.

@boywhoroared
Created June 15, 2011 18:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boywhoroared/1027744 to your computer and use it in GitHub Desktop.
Save boywhoroared/1027744 to your computer and use it in GitHub Desktop.
MYSQL: Copy a table from one schema to another.
USE db2;
CREATE TABLE table2 LIKE db1.table1;
INSERT INTO table2
SELECT * FROM db1.table1;
@jgdodson
Copy link

Here's a link to the related Stack Overflow discussion. link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment