1

I have multiple tables which need to be droped and replaced in my crowded MySQL5.1 DB.

I want to clone tables with names like 2015-11-17 2015-11-18... 2015-11-30 and rename them with names 2015-12-17 2015-12-18... 2015-12-30 like below :

+------------------------------+------------------------------+
|        original table name   |        cloned table name     |
+------------------------------+------------------------------+
| <prefix>_2015-11-17_<suffix> | <prefix>_2015-12-17_<suffix> |
| <prefix>_2015-11-18_<suffix> | <prefix>_2015-12-18_<suffix> |
| ...                          | ...                          |
| <prefix>_2015-11-30_<suffix> | <prefix>_2015-12-30_<suffix> |
+------------------------------+------------------------------+

How to do this efficiantly in phpMyAdmin environment.

amdixon
  • 3,814
  • 8
  • 25
  • 34
Ash
  • 173
  • 1
  • 2
  • 10
  • Welcome to StackOverflow. Check the StackOverflow's help on asking questions first, please. Focus on [How to ask a good question](http://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve), but also other [help topics](http://stackoverflow.com/help/asking) would be useful. – David Ferenczy Rogožan Dec 30 '15 at 17:45
  • How many tables? What about [RENAME TABLE Syntax](http://dev.mysql.com/doc/refman/5.1/en/rename-table.html)? – Paul Spiegel Dec 31 '15 at 04:22

0 Answers0