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

Detailed steps for batch deletion and modification of mysql tables with specific prefixes

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The following mainly brings you the detailed steps of batch deletion and modification of the mysql table with a specific prefix. I hope the detailed steps of batch deletion and modification of the mysql table with a specific prefix can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

Delete tables with specific prefixes in batch

Step 1: assemble sql statements

Select CONCAT ('drop table', table_name,';') FROM information_schema.tables Where table_name LIKE 'CA_%'

Step 2: select the contents of the red box to copy and paste and execute.

Tip: in order to uncheck the vertical bar (|), the left mouse button of Alt+ is selected in the column, so you can select the contents in the red box.

Batch modify table prefix

Step 1: assemble sql statements

Select concat ('alter table', table_name,' rename to cj_',substring (table_name,5),';') from information_schema.tables where table_name like 'xws_%'

Step 2: select the copy and paste result and execute it.

For the above on the specific prefix of the mysql table batch delete and modify detailed steps, we do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

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