Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

MySql rename table
https://forum.ivorde.com/mysql-rename-table-t146.html
Page 1 of 1

Author:  admin [ Wed Feb 02, 2011 6:15 pm ]
Post subject:  MySql rename table

To rename a mysql table from old_name to new_name, command is:
Quote:
mysql> RENAME TABLE old_name TO new_name

Author:  admin [ Sun Nov 13, 2011 2:01 pm ]
Post subject:  Re: MySql rename table

If the table's name happens to use special mysql characters ( like percentage char %), enclose the table name as follows:
Code:
mysql> rename table `%TABLE_PREFIX%email` to email;
Query OK, 0 rows affected (0.02 sec)

Author:  Darwin [ Mon Nov 28, 2011 3:39 am ]
Post subject:  Re: MySql rename table

You can try to do exact same thing with Information_Schema.Columns table
Something like
select concat('rename table ', column_name, ' to ' , lower(column_name) , ';')
from information_schema.columns where table_schema = 'your_schema_name';

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/