Detailed steps for batch deletion and modification of mysql tables with specific prefixes
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.