具体步骤:翻开cmd->输入“mysql -u root -p”->输入暗码,进入mysql->输入“alter table rename to/as new_tablename;”
下面的代码包含了建立表的历程:
#建立表构造.如许的建表体式格局,不仅仅是表的构造,连带着索引也会同时建立. 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)
相干教程:mysql视频教程
以上就是mysql怎样修正表名?的细致内容,更多请关注ki4网别的相干文章!