This article will tell you how to quickly modify the mysql table name. Friends who have the same needs can learn from it. I hope it will be helpful to you after reading it.
Mysql method to modify the table name:
Specific steps: Open cmd->Enter "mysql -u root -p"->Enter password , enter mysql->Enter "alter table rename to/as new_tablename;"
The following code includes the process of creating a table:
#创建表结构.这样的建表方式,不仅仅是表的结构,连带着索引也会同时创建. mysql> create table ts01 like ti_o_sms; Query OK, 0 rows affected (0.02 sec) #修改表名的语法:alter table old_tablename rename to/as new_tablename; mysql> alter table ts01 rename to ts01_new; Query OK, 0 rows affected (0.00 sec) mysql> show tables; +--------------------+ | Tables_in_mytest | +--------------------+ | sms_send_blacklist | | td_b_sendobject | | ti_o_sms | | ts01_new | +--------------------+ rows in set (0.00 sec)
Related tutorials:mysql video tutorial
The above is the detailed content of How to modify the table name in mysql?. For more information, please follow other related articles on the PHP Chinese website!