-
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
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
5 days ago · 1 comment
-
Firefox 3.6: Enable Visual Previews When Using Ctrl+Tab (Windows Only)
6 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
2 weeks ago · 2 comments
-
Gmail: How to block a sender from your inbox
3 weeks ago · 3 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
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.