<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Tech-Recipes - Latest Comments in Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Tue, 08 Sep 2009 00:16:23 -0000</lastBuildDate><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-16167891</link><description>yeah the single-line command is a bad scene.  Even the two-line command will have issues in some cases, eg if you have foreign key restraints or are inserting rows with autoincrement keys that equal 0 (they get incremented to 1).  I wrapped the statements in code used by mysqldump.&lt;br&gt;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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">intuited</dc:creator><pubDate>Tue, 08 Sep 2009 00:16:23 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-15735941</link><description>It creates a duplicate table but does not copy the constraints and other meta details of a table</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">viralpatel</dc:creator><pubDate>Tue, 01 Sep 2009 17:42:18 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-15523328</link><description>I was just looking for this!&lt;br&gt;thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soodvarun</dc:creator><pubDate>Fri, 28 Aug 2009 09:08:44 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-14950944</link><description>This could also be done in one step with the following:&lt;br&gt;&lt;br&gt;   create table recipies_new select * from production.recipies;&lt;br&gt;&lt;br&gt;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]</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">bryonbean</dc:creator><pubDate>Mon, 17 Aug 2009 04:55:46 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-14837530</link><description>The simplest solutions are the best. Thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Name</dc:creator><pubDate>Fri, 14 Aug 2009 11:58:08 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-12721404</link><description>Thanks a lot, this saved me a lot of time!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brandon</dc:creator><pubDate>Wed, 15 Jul 2009 21:30:15 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-8100200</link><description>Very helpful! thank you :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris</dc:creator><pubDate>Sun, 12 Apr 2009 16:18:56 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-4326840</link><description>It's working!!! Thank you very much! :-)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alfredas</dc:creator><pubDate>Thu, 11 Dec 2008 07:59:53 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-3714579</link><description>It worked without the 'INTO' for me.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jaxfor3</dc:creator><pubDate>Wed, 12 Nov 2008 14:11:40 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-3713659</link><description>Awesome, thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dan</dc:creator><pubDate>Wed, 12 Nov 2008 13:23:41 -0000</pubDate></item><item><title>Re: Copy an existing MySQL table to a new table | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/1487/copy-an-existing-mysql-table-to-a-new-table/#comment-3429317</link><description>It wont work without the keyword 'INTO'.&lt;br&gt;&lt;br&gt;CORRECT IT AS ,&lt;br&gt;&lt;br&gt;INSERT INTO recipes_new SELECT * FROM production.recipes;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thennarasu</dc:creator><pubDate>Sat, 01 Nov 2008 05:02:44 -0000</pubDate></item></channel></rss>