Mysql批量删除前缀或者后缀表_MySQL
oracl有drop table like 的用法,但是mysql没有,可以写脚本(不做赘述),也可以组装sql。
注意,我的数据库名字是test,有个表叫data,然后我准备四个有相同前缀的表,批量删除,准备数据可以用这条sql
CREATE TABLE test_1201 SELECT * FROM `data`;
CREATE TABLE test_1202 SELECT * FROM `data`;
CREATE TABLE test_1203 SELECT * FROM `data`;
CREATE TABLE test_1205 SELECT * FROM `data`;
SELECT CONCAT( "DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) AS statement FROM information_schema.tables WHERE table_schema = 'test' AND table_name LIKE 'test_12%';
上边这条sql是显示一个sql结果,把上边执行出来的结果再执行一边就可以了。
(只要改table_schema(这是数据库的名字),跟table_name(这是数据表的名字)即可)
DROP TABLE test_1201,test_1202,test_1203;

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to open files with the suffix .vsd In daily computer use, we often encounter various types of file formats, and one of the common file formats is files with the suffix .vsd. So, how should we open this file with the suffix .vsd? First, we need to understand the meaning and purpose of .vsd files. VSD is the file format of Visio, a graphical drawing tool developed by Microsoft. VSD files are mainly used to create and edit various types of diagrams

When editing Excel, you may need to add the same prefix to a column of data. If you add them one by one, it is a waste of time. Is there any way to add prefixes to Excel in batches? Of course there are, and here are some commonly used methods of adding prefixes. How to quickly add a prefix in Excel? 1. Cell formatting method 1. Select the cell range and press Ctrl1 at the same time to set the cell format. (Or right-click the mouse and select Format Cells) 2. Click [Customize], enter "Finance Department-@" in the [Type] option, and finally click [OK] to complete! 2. Plug-in method 1. Download and install the Excel plug-in Square Grid.

What is the magnet link prefix? Magnet links are a method for sharing files on the Internet. It has become the preferred way for many people to share and download resources. It allows users to easily get the files they need through a unified link. However, for those who are new to magnet links, some of the terms and concepts may be confusing. One of the common questions is, what is the magnet link prefix? Before answering this question, let us first understand the basic structure of magnet links. Magnet links consist of two parts: prefix and unique

Xunlei is a download software based on multi-resource hyper-threading technology developed by Xunlei. Many users want to modify the prefix after downloading files through Xunlei and saving them. How to set it? In fact, the operation is very simple, let’s take a look with the editor below. How to change the prefix of Thunder link? 1. First open and enter Thunder, then click the New button in the upper left corner. 2. Click the Add download link option and change the input method to English. 3. It is recommended to copy and paste the link content directly into the download box. 4. Finally add the name of the modified link prefix and click Download Now.

The document suffix, also called the file extension, is a mechanism used by the operating system to mark file types; the main function of the document suffix is to let the system decide what software should be used to run when the user opens the specified file, so it can be used Used to protect certain files, save disk space, clear icons on the settings panel, and set associations.

The word prefix is defined by the beginning of a word or letter. In this article, we will learn how to filter list elements starting with a given prefix using Python using Python built-in functions like startswith(), filter(), lambda, and len(). Let’s take an example to understand this problem − Let’stakeanexampletounderstandthis:Givenelementlist,My_list=[“Amelia”,“Kinshuk”,“Rosy”,“Aman”]Keywordtobesearched,Prefix=“Am”Finalresu

Discovering suffix factorials and corresponding suffix sums from arrays is entirely feasible when you understand the tools and techniques of the C++ programming language. That's exactly what we'll discuss in this article, including method syntax, algorithmic complexity, and efficient ways to unravel them. Additionally, this article shows two concrete code examples based on these methods. Finally, we summarize our insights into key takeaways. Syntax To ensure a clear understanding of the upcoming code examples, familiarize yourself with the syntax of the methods used before diving into their algorithms. //Methodsyntax<return_type>methodName(<parameters&

Files with the suffix eml are mail files, used to store email content and information. If you want to open an eml file, you can do it through the following methods. Method 1: Use email client software to install email client software, such as Microsoft Outlook, Mozilla Thunderbird, etc. Open the installed email client software. Find the "Import" or "Open" option in the software's menu bar or toolbar. Click the "Import" or "Open" option in the pop-up dialog box
