Created
June 15, 2011 18:27
-
-
Save boywhoroared/1027744 to your computer and use it in GitHub Desktop.
MYSQL: Copy a table from one schema to another.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE db2; | |
CREATE TABLE table2 LIKE db1.table1; | |
INSERT INTO table2 | |
SELECT * FROM db1.table1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a link to the related Stack Overflow discussion. link