MySQL table - change or rename MySql table name change mysql table name, change table name, mysql table, rename table, rename mysql table
Rename MySQL table - Change MySQL table name:
Database or website admin work sometimes asks for simple tasks like renaming a mysql table.
Say you have a mysql database named test and, inside it, you have the following 3 tables:
$ mysql -u root -ppassword test Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 11342 Server version: 5.0.45-log FreeBSD port: mysql-server-5.0.45_1
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | Table_test1 | | Table_test2 | | Table_test3 | +----------------+ 3 rows in set (0.00 sec) mysql>
and you want to change the name of Table_test1's table into new_table. This is done by using using the mysql rename table syntax: RENAME TABLE old_table TO new_table
Designed and developed by Andrei Manescu. Optimized for Mozilla Firefox.
Copyright 2007 Andrei Manescu
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by those who posted them.