Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the table name by mysql

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how mysql modifies the table name, which has a certain reference value, and friends who need it can refer to it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Specific steps: open cmd- > enter "mysql- u root-p"-> enter the password, enter mysql- > enter "alter table rename to/as new_tablename;"

The following code includes the process of creating a table:

# create a table structure. This way of creating a table is not only the structure of the table, but also creates .MySQL > create table ts01 like ti_o_sms; Query OK, 0 rows affected (0.02 sec) # modifies the syntax of the table name: alter table old_tablename rename to/as new_tablename;mysql > alter table ts01 rename to ts01_new;Query OK, 0 rows affected (0 sec) mysql > show tables +-+ | Tables_in_mytest | +-+ | sms_send_blacklist | | td_b_sendobject | | ti_o_sms | | ts01_new | +-+ rows in set (0.00 sec) Thank you for reading this article carefully. I hope it will be helpful for everyone to share how mysql modifies the table name. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report