{"id":8551,"date":"2020-07-21T05:11:00","date_gmt":"2020-07-21T05:11:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8551"},"modified":"2025-08-19T05:33:19","modified_gmt":"2025-08-19T05:33:19","slug":"how-to-duplicate-table-in-mysql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/","title":{"rendered":"How To Duplicate Table in MySQL"},"content":{"rendered":"\n<p>Sometimes you may need to copy data from one table to another in MySQL or copy tables in MySQL. Here&#8217;s how to duplicate table in MySQL. You can use it to clone table in MySQL or copy table structure, or even copy table from one database to another.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#How_To_Duplicate_Table_in_MySQL\" >How To Duplicate Table in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#MySQL_Copy_data_from_one_table_to_a_new_table\" >MySQL Copy data from one table to a new table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#MySQL_Copy_Table_Structure_to_New_Table\" >MySQL Copy Table Structure to New Table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#MySQL_Copy_Data_from_one_table_to_existing_table\" >MySQL Copy Data from one table to existing table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#MySQL_Copy_Table_from_One_database_to_Another\" >MySQL Copy Table from One database to Another<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_To_Duplicate_Table_in_MySQL\"><\/span>How To Duplicate Table in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the steps to duplicate table in MySQL. There are different use cases to copy data from one table to another. We will look at each of them in detail.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MySQL_Copy_data_from_one_table_to_a_new_table\"><\/span>MySQL Copy data from one table to a new table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you need to duplicate table in MySQL to a new table, you need to use CREATE TABLE and SELECT statement as shown below<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE new_table \nSELECT column, column2, column3 \nFROM\n    existing_table;\n<\/pre>\n\n\n\n<p>Let&#8217;s say you have an existing table <em>products<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select * from products;\n+------------+--------------------+-------+\n| product_id | product_name       | price |\n+------------+--------------------+-------+\n|          1 | iPhone 11          |   400 |\n|          2 | Samsung Galaxy A50 |   250 |\n+------------+--------------------+-------+\n<\/pre>\n\n\n\n<p>Here&#8217;s the SQL query to copy <em>products<\/em> table into new table called <em>new_products<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table new_products\n       select *\n       from products;\n\nmysql&gt; select * from new_products;\n+------------+--------------------+-------+\n| product_id | product_name       | price |\n+------------+--------------------+-------+\n|          1 | iPhone 11          |   400 |\n|          2 | Samsung Galaxy A50 |   250 |\n+------------+--------------------+-------+\n<\/pre>\n\n\n\n<p>It is important to note that the new table will be created only if it doesn&#8217;t exist. Otherwise, you will get an error. To avoid getting an error when you duplicate table in MySQL, you can use IF NOT EXIST in CREATE TABLE statement, as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table <strong>if not exist<\/strong> new_products\n       select *\n       from products;\n<\/pre>\n\n\n\n<p>To copy only partial data from one table to new table, you can use WHERE condition in your SELECT statement as shown<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE new_table \nSELECT column1, column2, column3 \nFROM\n    existing_table\nWHERE\n    conditions;\n<\/pre>\n\n\n\n<p>Here&#8217;s the SQL query to copy partial data from <em>products<\/em> table into new table called <em>new_products2<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table new_products2\n       select *\n       from products\n       <strong>where product_id=1<\/strong>;\n\nmysql&gt; select * from new_products2;\n+------------+--------------+-------+\n| product_id | product_name | price |\n+------------+--------------+-------+\n|          1 | iPhone 11    |   400 |\n+------------+--------------+-------+\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MySQL_Copy_Table_Structure_to_New_Table\"><\/span>MySQL Copy Table Structure to New Table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The above queries only copy table and data. They will not copy table objects such as primary key, indexes, constraints, triggers. To copy table structure and data, you need to use CREATE TABLE statement with LIKE keyword, as shown below<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE IF NOT EXISTS new_table LIKE existing_table;\n<\/pre>\n\n\n\n<p>Let&#8217;s say you have an <em>orders<\/em> table with primary key<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe orders;\n+--------------+--------------+------+-----+-------------------+----------------+\n| Field        | Type         | Null | Key | Default           | Extra          |\n+--------------+--------------+------+-----+-------------------+----------------+\n| id           | int(11)      | NO   | <strong>PRI<\/strong> | NULL              | auto_increment |\n| product_name | varchar(255) | NO   |     | NULL              |                |\n| order_date   | date         | YES  |     | NULL              |                |\n| price        | int(11)      | NO   |     | NULL              |                |\n| description  | text         | YES  |     | NULL              |                |\n| created_at   | timestamp    | NO   |     | CURRENT_TIMESTAMP |                |\n+--------------+--------------+------+-----+-------------------+----------------+\n<\/pre>\n\n\n\n<p>and you want to copy structure of <em>orders<\/em> to <em>new_orders<\/em> table. Here&#8217;s the SQL query to copy table structure to new table.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table new_orders like orders;\n\nmysql&gt; describe new_orders;\n+--------------+--------------+------+-----+-------------------+----------------+\n| Field        | Type         | Null | Key | Default           | Extra          |\n+--------------+--------------+------+-----+-------------------+----------------+\n| id           | int(11)      | NO   | <strong>PRI<\/strong> | NULL              | auto_increment |\n| product_name | varchar(255) | NO   |     | NULL              |                |\n| order_date   | date         | YES  |     | NULL              |                |\n| price        | int(11)      | NO   |     | NULL              |                |\n| description  | text         | YES  |     | NULL              |                |\n| created_at   | timestamp    | NO   |     | CURRENT_TIMESTAMP |                |\n+--------------+--------------+------+-----+-------------------+----------------+\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MySQL_Copy_Data_from_one_table_to_existing_table\"><\/span>MySQL Copy Data from one table to existing table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The above statement will create new table with structure of old table. Then you need to use INSERT statement to copy data from old table to new table.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">INSERT new_table\nSELECT * FROM existing_table;<\/pre>\n\n\n\n<p>Here&#8217;s the SQL query to copy data from <em>orders<\/em> to existing table <em>new_orders<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; insert new_orders\n       select * from orders;\n\nmysql&gt; select * from orders;\n+----+--------------+------------+-------+-------------+---------------------+\n| id | product_name | order_date | price | description | created_at          |\n+----+--------------+------------+-------+-------------+---------------------+\n|  1 | A            | 2020-07-01 |   150 | New product | 2020-06-01 00:00:00 |\n|  2 | B            | 2020-07-01 |   235 | Old product | 2020-06-15 00:00:00 |\n+----+--------------+------------+-------+-------------+---------------------+\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MySQL_Copy_Table_from_One_database_to_Another\"><\/span>MySQL Copy Table from One database to Another<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you want to duplicate table in MySQL from database to another, then just include the database names in your table names, as shown below in bold<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE <strong>destination_db.<\/strong>new_table \nLIKE <strong>source_db.<\/strong>existing_table;\n\nINSERT <strong>destination_db.<\/strong>new_table \nSELECT *\nFROM <strong>source_db.<\/strong>existing_table;\n<\/pre>\n\n\n\n<p>The first statement will duplicate table structure in MySQL from source database (e.g source_db) to another (e.g destination_db). The second statement will copy data from one table to another.<\/p>\n\n\n\n<p>Replace <em>source_db<\/em> and <em>destination_db<\/em> in above queries with source and destination databases respectively.<\/p>\n\n\n\n<p>You can also use MySQLDump utility to duplicate table structure and\/or data.<\/p>\n\n\n\n<p>Hopefully, this article will help you duplicate table in MySQL. Please be careful when you duplicate table in MySQL, with large number of records, as it can take a lot of time &amp; resources.<\/p>\n\n\n\n<p><a href=\"http:\/\/ubiq.co\/\">Ubiq<\/a>&nbsp;makes it easy to visualize data in minutes, and monitor in real-time dashboards.&nbsp;<a href=\"http:\/\/ubiq.co\/accounts\/register\">Try it<\/a>&nbsp;Today!<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-calculate-revenue-in-mysql\/\">How to Calculate Revenue in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\">How to Get Cumulative Total Users in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\">How to Copy Table in MySQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here&#8217;s how to duplicate table in MySQL.<\/p>\n","protected":false},"author":1,"featured_media":8554,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[490,489],"class_list":["post-8551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-copy-data","tag-copy-table"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Duplicate Table in MySQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here&#039;s how to duplicate table in MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Duplicate Table in MySQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here&#039;s how to duplicate table in MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-21T05:11:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-19T05:33:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"320\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How To Duplicate Table in MySQL\",\"datePublished\":\"2020-07-21T05:11:00+00:00\",\"dateModified\":\"2025-08-19T05:33:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\"},\"wordCount\":536,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1\",\"keywords\":[\"copy data\",\"copy table\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\",\"name\":\"How To Duplicate Table in MySQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1\",\"datePublished\":\"2020-07-21T05:11:00+00:00\",\"dateModified\":\"2025-08-19T05:33:19+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here's how to duplicate table in MySQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1\",\"width\":730,\"height\":320,\"caption\":\"duplicate table in mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Duplicate Table in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/\"],\"url\":\"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Duplicate Table in MySQL - Ubiq BI","description":"Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here's how to duplicate table in MySQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How To Duplicate Table in MySQL - Ubiq BI","og_description":"Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here's how to duplicate table in MySQL.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-07-21T05:11:00+00:00","article_modified_time":"2025-08-19T05:33:19+00:00","og_image":[{"width":730,"height":320,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp","type":"image\/webp"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How To Duplicate Table in MySQL","datePublished":"2020-07-21T05:11:00+00:00","dateModified":"2025-08-19T05:33:19+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/"},"wordCount":536,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1","keywords":["copy data","copy table"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/","name":"How To Duplicate Table in MySQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1","datePublished":"2020-07-21T05:11:00+00:00","dateModified":"2025-08-19T05:33:19+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to clone tables in MySQL or copy data from one table to another. Here's how to duplicate table in MySQL.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1","width":730,"height":320,"caption":"duplicate table in mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How To Duplicate Table in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/how-to-duplicate-table-in-mysql.webp?fit=730%2C320&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2dV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=8551"}],"version-history":[{"count":4,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8551\/revisions"}],"predecessor-version":[{"id":9197,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8551\/revisions\/9197"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8554"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}