-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
bej
4 comments · 1 points
-
dimithri
5 comments · 1 points
-
-
Popular Threads
-
Windows 7: How to Prevent the Mouse from Waking your PC
14 hours ago · 1 comment
-
Outlook 2010: Turn Off Attachment Preview
1 week ago · 1 comment
-
Gmail: How to Send SMS Messages Without Using Email
2 weeks ago · 2 comments
-
Windows 7 – Prevent Live Messenger from Opening at Start Up
1 week ago · 1 comment
-
Symfony: Drop Down List Box Without Submit Button
3 weeks ago · 1 comment
-
Windows 7: How to Prevent the Mouse from Waking your PC
CORRECT IT AS ,
INSERT INTO recipes_new SELECT * FROM production.recipes;
create table recipies_new select * from production.recipies;
Be aware that this method doesn't seem to duplicate any of the indexes from the original table into the new table. [Using MySQL 5.1]
thanks
Also doing a mysqldump, replacing the table names in the statements, and then loading the resulting dump is another way to do this. It's actually probably more robust than doing it with insert..select, but will be slower and a bit tricky.