{"id":8548,"date":"2020-08-07T02:29:00","date_gmt":"2020-08-07T02:29:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8548"},"modified":"2025-08-19T05:34:37","modified_gmt":"2025-08-19T05:34:37","slug":"copy-table-mysql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/","title":{"rendered":"How To Copy Table in MySQL"},"content":{"rendered":"\n<p>Sometimes you may need to copy table in MySQL. There are many different ways to copy table in MySQL. Here are the steps to copy table in MySQL. You can use them to copy table to another table, copy table from one database to another, copy table structure, copy table with data, copy table structure with index, or copy table from one server 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\/copy-table-mysql\/#How_To_Copy_Table_in_MySQL\" >How To Copy 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\/copy-table-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\/copy-table-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\/copy-table-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\/copy-table-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_Copy_Table_in_MySQL\"><\/span>How To Copy Table in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here&#8217;s how to copy table in MySQL. There are different use cases to copy table in MySQL. 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>Typically, you need to copy table in MySQL to a new table. In this case, 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>In the above query, you need to specify names of existing table along with the columns that you want to copy, and also new table name. MySQL will populate your new table with the result of your SELECT statement.<\/p>\n\n\n\n<p>Let&#8217;s say you have an existing table <em>product_list<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select * from product_list;\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>product_list<\/em> table into new table called <em>new_product_list<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table new_product_list\n       select *\n       from product_list;\n\nmysql&gt; select * from new_product_list;\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>Please 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 clause 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_product_list\n       select *\n       from product_list;\n<\/pre>\n\n\n\n<p>If you want to copy only partial data from one table to new table, that is some rows but not all, 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\n<strong>WHERE\n    conditions<\/strong>;\n<\/pre>\n\n\n\n<p>Here&#8217;s the SQL query to copy partial data from <em>product_list<\/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 product_list\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 SQL 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 (id)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe orders;\n+--------------+--------------+------+-----+-------------------+----------------+\n| Field        | Type         | Null | Key | Default           | Extra          |\n+--------------+--------------+------+-----+-------------------+----------------+\n<strong>| id           | int(11)      | NO   | PRI | NULL              | auto_increment |<\/strong>\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<strong>| id           | int(11)      | NO   | PRI | NULL              | auto_increment |<\/strong>\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>As you can see, the new_orders table also has a primary key field <em>id. <\/em>The above statement will only copy table structure but not data. You need to separately copy data, as show in next section.<\/p>\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, but it will be an empty 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 while using the above SQL queries, 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 SQL statement above will duplicate table structure in MySQL from source database (e.g <em>source_db<\/em>) to another (e.g <em>destination_db<\/em>). 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>Hopefully, this article will help you copy table in MySQL. Please be careful when you copy 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-duplicate-table-in-mysql\/\">How to Duplicate Table 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 Users in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-calculate-revenue-in-mysql\/\">How to Calculate Revenue in MySQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to copy table in MySQL or clone table in MySQL. Here&#8217;s how to copy table in MySQL.<\/p>\n","protected":false},"author":1,"featured_media":8549,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[488,489],"class_list":["post-8548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-clone-table","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 Copy Table in MySQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to copy table in MySQL or clone table in MySQL. Here&#039;s how to copy 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\/copy-table-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Copy Table in MySQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to copy table in MySQL or clone table in MySQL. Here&#039;s how to copy table in MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/copy-table-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-08-07T02:29:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-19T05:34:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\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\/copy-table-mysql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How To Copy Table in MySQL\",\"datePublished\":\"2020-08-07T02:29:00+00:00\",\"dateModified\":\"2025-08-19T05:34:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\"},\"wordCount\":642,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1\",\"keywords\":[\"clone table\",\"copy table\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\",\"name\":\"How To Copy Table in MySQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1\",\"datePublished\":\"2020-08-07T02:29:00+00:00\",\"dateModified\":\"2025-08-19T05:34:37+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to copy table in MySQL or clone table in MySQL. Here's how to copy table in MySQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1\",\"width\":730,\"height\":410,\"caption\":\"copy table mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Copy 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 Copy Table in MySQL - Ubiq BI","description":"Sometimes you may need to copy table in MySQL or clone table in MySQL. Here's how to copy 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\/copy-table-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How To Copy Table in MySQL - Ubiq BI","og_description":"Sometimes you may need to copy table in MySQL or clone table in MySQL. Here's how to copy table in MySQL.","og_url":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-08-07T02:29:00+00:00","article_modified_time":"2025-08-19T05:34:37+00:00","og_image":[{"width":730,"height":410,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-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\/copy-table-mysql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How To Copy Table in MySQL","datePublished":"2020-08-07T02:29:00+00:00","dateModified":"2025-08-19T05:34:37+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/"},"wordCount":642,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1","keywords":["clone table","copy table"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/","url":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/","name":"How To Copy Table in MySQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1","datePublished":"2020-08-07T02:29:00+00:00","dateModified":"2025-08-19T05:34:37+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to copy table in MySQL or clone table in MySQL. Here's how to copy table in MySQL.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/copy-table-mysql.webp?fit=730%2C410&ssl=1","width":730,"height":410,"caption":"copy table mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How To Copy 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\/copy-table-mysql.webp?fit=730%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2dS","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8548","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=8548"}],"version-history":[{"count":3,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8548\/revisions"}],"predecessor-version":[{"id":9199,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8548\/revisions\/9199"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8549"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}