{"id":8482,"date":"2020-12-07T03:56:00","date_gmt":"2020-12-07T03:56:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8482"},"modified":"2025-08-29T04:33:19","modified_gmt":"2025-08-29T04:33:19","slug":"how-to-rename-table-in-mysql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/","title":{"rendered":"How To Rename Table in MySQL"},"content":{"rendered":"\n<p>Sometimes database administrators may need to change a table name in MySQL during database restructuring, or to make it look more intuitive. In this article we will look at how to rename table in MySQL. There are two ways to rename table in MySQL &#8211; using ALTER and using RENAME statements. We will look at both these approaches and understand their differences.<\/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-rename-table-in-mysql\/#How_To_Rename_Table_in_MySQL\" >How To Rename 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-rename-table-in-mysql\/#Rename_Table_with_ALTER_Table_Statement\" >Rename Table with ALTER Table Statement<\/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-rename-table-in-mysql\/#Rename_Table_Using_RENAME_Table_Statement\" >Rename Table Using RENAME Table Statement<\/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-rename-table-in-mysql\/#Rename_Multiple_Tables\" >Rename Multiple Tables<\/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-rename-table-in-mysql\/#Rename_Temporary_Table\" >Rename Temporary Table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#Difference_between_ALTER_TABLE_and_RENAME_TABLE\" >Difference between ALTER TABLE and RENAME TABLE<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_To_Rename_Table_in_MySQL\"><\/span>How To Rename Table in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can rename table in MySQL using ALTER TABLE or RENAME TABLE statement. We will learn how to use them to change table names in MySQL. We will also look at couple of important use cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rename_Table_with_ALTER_Table_Statement\"><\/span>Rename Table with ALTER Table Statement<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here is the syntax to rename table using ALTER TABLE statement.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">alter table old_table_name\nrename to new_table_name;<\/pre>\n\n\n\n<p>In the above statement, you need to specify the old table name and new table name.<\/p>\n\n\n\n<p>Let us say you have the following sales table (id, amount, order_date).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe sales;<br>+------------+---------+------+-----+---------+-------+<br>| Field      | Type    | Null | Key | Default | Extra |<br>+------------+---------+------+-----+---------+-------+<br>| id         | int(11) | NO   | PRI | NULL    |       |<br>| order_date | date    | YES  |     | NULL    |       |<br>| amount     | int(11) | YES  |     | NULL    |       |<br>+------------+---------+------+-----+---------+-------+<\/pre>\n\n\n\n<p>Here is an example to rename <em>sales<\/em> table to <em>orders<\/em> using ALTER TABLE statement.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">alter table sales\nrename to orders;<\/pre>\n\n\n\n<p>Now if you try to view details of sales table, you will get an error since it does not exist.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe sales;<br>ERROR 1146 (42S02): Table 'sample.sales' doesn't exist<\/pre>\n\n\n\n<p>Instead, if you try to view details of its new name orders, then you will get the right output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe orders;<br>+------------+---------+------+-----+---------+-------+<br>| Field      | Type    | Null | Key | Default | Extra |<br>+------------+---------+------+-----+---------+-------+<br>| id         | int(11) | NO   | PRI | NULL    |       |<br>| order_date | date    | YES  |     | NULL    |       |<br>| amount     | int(11) | YES  |     | NULL    |       |<br>+------------+---------+------+-----+---------+-------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rename_Table_Using_RENAME_Table_Statement\"><\/span>Rename Table Using RENAME Table Statement<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here is the syntax to rename table using RENAME statement.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rename table old_table_name to new_table_name;<\/pre>\n\n\n\n<p>In the above statement, you need to specify the old table name and new table name.<\/p>\n\n\n\n<p>Here is an example to rename <em>orders<\/em> table to <em>sales<\/em> using RENAME TABLE statement.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; rename table orders to sales;<\/pre>\n\n\n\n<p>Now if you try to get details of orders table, it will show an error.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe orders;<br>ERROR 1146 (42S02): Table 'sample.orders' doesn't exist<\/pre>\n\n\n\n<p>On the other hand, if you try to view details of new table name, it will give desired result.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; describe sales;<br>+------------+---------+------+-----+---------+-------+<br>| Field      | Type    | Null | Key | Default | Extra |<br>+------------+---------+------+-----+---------+-------+<br>| id         | int(11) | NO   | PRI | NULL    |       |<br>| order_date | date    | YES  |     | NULL    |       |<br>| amount     | int(11) | YES  |     | NULL    |       |<br>+------------+---------+------+-----+---------+-------+<\/pre>\n\n\n\n<p><strong>Please note<\/strong>:<\/p>\n\n\n\n<p>When you rename a table in MySQL, all views, stored procedures and foreign keys that reference the old table name will stop working. So you will need to update these views, stored procedures and foreign keys to reference its new table name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rename_Multiple_Tables\"><\/span>Rename Multiple Tables<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Often you may need to rename multiple tables at one go. In such cases, you need to use RENAME TABLE statement. Using ALTER TABLE statement will give you an error. Here is the syntax to use RENAME TABLE with multiple tables. This is a major difference between RENAME TABLE and ALTER TABLE.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; RENAME TABLE table1 TO new_table1, table2 TO new_table2; <\/pre>\n\n\n\n<p>Here is the query to rename sales to orders and employees to customers.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; RENAME TABLE sales TO orders, employees TO customers; <\/pre>\n\n\n\n<p>If you use ALTER table statement, it will give an error as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; alter table sales rename to orders. employees rename to customers;<br>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rename to customers' at line 1<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rename_Temporary_Table\"><\/span>Rename Temporary Table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>On the other hand, ALTER TABLE can be used to rename temporary table but RENAME TABLE cannot be used for this purpose. Here is an example.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create temporary table sales_1(id int, amount int, order_date date);<br><br>mysql&gt; insert into sales_1(id, amount, order_date) <br>       values(1, 250, '2024-07-26'),<br>             (2,450,'2024-07-27'),<br>             (3,200,'2024-05-12');<br><br>mysql&gt; select * from sales_1;<br>+------+--------+------------+<br>| id   | amount | order_date |<br>+------+--------+------------+<br>|    1 |    250 | 2024-07-26 |<br>|    2 |    450 | 2024-07-27 |<br>|    3 |    200 | 2024-05-12 |<br>+------+--------+------------+<\/pre>\n\n\n\n<p>If you use RENAME statement to rename this table, you will get an error.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; rename table sales_1 to sales_2;<br>ERROR 1017 (HY000): Can't find file: '.\\sample\\sales_1.frm' (errno: 2)<\/pre>\n\n\n\n<p>Therefore, you need to use ALTER TABLE statement.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; alter table sales_1 rename to sales_2;<br><br>mysql&gt; select * from sales_2;<br>+------+--------+------------+<br>| id   | amount | order_date |<br>+------+--------+------------+<br>|    1 |    250 | 2024-07-26 |<br>|    2 |    450 | 2024-07-27 |<br>|    3 |    200 | 2024-05-12 |<br>+------+--------+------------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Difference_between_ALTER_TABLE_and_RENAME_TABLE\"><\/span>Difference between ALTER TABLE and RENAME TABLE<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the key differences between ALTER TABLE and RENAME TABLE statements.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>ALTER TABLE<\/td><td>RENAME TABLE<\/td><\/tr><tr><td>Can be used to rename only one table at a time. Cannot be used to rename multiple tables.<\/td><td>Can be used to rename single or multiple at once<\/td><\/tr><tr><td>Can be used to rename temporary tables<\/td><td>Cannot be used to rename temporary tables<\/td><\/tr><tr><td>Can be used to rename views also<\/td><td>Cannot be used to rename views.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As you can see, it is quite easy to change table name in MySQL. In this article, we have learnt how to rename tables in MySQL using ALTER TABLE and RENAME TABLE statements. We have also learnt how to rename multiple tables using RENAME statement. We have learnt how to rename temporary tables with ALTER TABLE statement. Depending on your requirement, you can use either of these statements to change table names in MySQL.<\/p>\n\n\n\n<p>Need a reporting tool for MySQL? <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-run-multiple-mysql-instances-on-same-machine\/\">How to Run Multiple MySQL Instances<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-insert-multiple-rows-in-mysql\/\">How to Insert Multiple Rows in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-update-a-column-based-on-another-column-in-sql\/\">How to Update Column Based on Another Column<\/a><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to change a table name in MySQL. Here is how to rename table in MySQL.<\/p>\n","protected":false},"author":1,"featured_media":8485,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[469],"class_list":["post-8482","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-rename-table"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Rename Table in MySQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to change a table name in MySQL. Here is how to rename 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-rename-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 Rename Table in MySQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to change a table name in MySQL. Here is how to rename table in MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-rename-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-12-07T03:56:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-29T04:33:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/mysql-rename-table.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\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=\"4 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-rename-table-in-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How To Rename Table in MySQL\",\"datePublished\":\"2020-12-07T03:56:00+00:00\",\"dateModified\":\"2025-08-29T04:33:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/\"},\"wordCount\":668,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/mysql-rename-table.webp?fit=700%2C300&ssl=1\",\"keywords\":[\"rename table\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/\",\"name\":\"How To Rename Table in MySQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/mysql-rename-table.webp?fit=700%2C300&ssl=1\",\"datePublished\":\"2020-12-07T03:56:00+00:00\",\"dateModified\":\"2025-08-29T04:33:19+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to change a table name in MySQL. Here is how to rename table in MySQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/mysql-rename-table.webp?fit=700%2C300&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/mysql-rename-table.webp?fit=700%2C300&ssl=1\",\"width\":700,\"height\":300,\"caption\":\"rename table in mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-rename-table-in-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Rename 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 Rename Table in MySQL - Ubiq BI","description":"Sometimes you may need to change a table name in MySQL. Here is how to rename 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-rename-table-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How To Rename Table in MySQL - Ubiq BI","og_description":"Sometimes you may need to change a table name in MySQL. Here is how to rename table in MySQL.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-12-07T03:56:00+00:00","article_modified_time":"2025-08-29T04:33:19+00:00","og_image":[{"width":700,"height":300,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/mysql-rename-table.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How To Rename Table in MySQL","datePublished":"2020-12-07T03:56:00+00:00","dateModified":"2025-08-29T04:33:19+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/"},"wordCount":668,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/mysql-rename-table.webp?fit=700%2C300&ssl=1","keywords":["rename table"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/","name":"How To Rename Table in MySQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/mysql-rename-table.webp?fit=700%2C300&ssl=1","datePublished":"2020-12-07T03:56:00+00:00","dateModified":"2025-08-29T04:33:19+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to change a table name in MySQL. Here is how to rename table in MySQL.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/mysql-rename-table.webp?fit=700%2C300&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/mysql-rename-table.webp?fit=700%2C300&ssl=1","width":700,"height":300,"caption":"rename table in mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-rename-table-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How To Rename 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\/2020\/12\/mysql-rename-table.webp?fit=700%2C300&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2cO","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8482","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=8482"}],"version-history":[{"count":4,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8482\/revisions"}],"predecessor-version":[{"id":9339,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8482\/revisions\/9339"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8485"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}