Batch Delete SQL statements of a specified prefix table in MySQL

Copy codeThe Code is as follows:Select CONCAT ('drop table', table_name ,';')FROM information_schema.tablesWhere table_name LIKE 'dede _ % '; "Dede" is the prefix of the table to be deleted. After this SQL statement is executed, a series of SQL

Analysis on the conversion between mysql shared tablespace and exclusive tablespace

The innodb Engine differs greatly from the MYISAM engine. In particular, its data storage format.For the innodb data structure, we must first solve two conceptual problems: the shared tablespace and the exclusive tablespace.What are shared and

How to use SQL commands to view the Mysql database size

To know the size of each database, follow these steps:1. Enter the information_schema database (storing information about other databases)Use information_schema;2. query the size of all data:Select concat (round (sum (data_length/1024/1024), 2), 'mb'

Share the differences between major mysql versions

I. Differences in Common commands of different versions Show innodb status \ G mysql-5.1 Show engines innodb status \ G mysql-5.5 User @ '%' about grant authorization mysql-5.5 does not contain localhost Ii. Main differences between MySQL 4.1/5.0/5.

Mysql-based Database Password

When I used the mysql database in my experiment today, I forgot my password and asked me to find it for a long time. Now I want to introduce my own method: I used mysql functions for testing.Copy codeThe Code is as follows:Mysql> select user,

Usage of mysql prompt

The prompt command displays the current user, database, time, and other information at the mysql prompt.Copy codeThe Code is as follows:Mysql-uroot-p -- prompt = "\\ u \\ h :\\ d \\ r :\\ m :\\ s>"After the setting is successful:Copy codeThe Code is

How mysql converts a column value to a column

Copy codeThe Code is as follows:-- Create a databaseCreate table 'rate '('Uname' VARCHAR (300 ),'Object' VARCHAR (300 ),'Score 'varchar (300)); -- Insert dataInsert into test. rate (uname, object, score)VALUES ('aaa', 'China', '67 '),('Aaa', 'Math',

Usage of mysql-Based Query statements

1> query data in addition to the first three data tables. At first, I thought of this statement. SELECT * FROM admin WHERE userid not in (SELECT userid FROM admin order by userid LIMIT 3) order by userid DESC But it will reportThis version of MySQL

Detailed explanation of the difference between SET and SELECT assignment in SQL

Recently, many SQL statements are written in the project, and variable assignment is often used, and I use SET and SELECT to achieve the effect.What is the difference between the two? When and which one?After online queries and personal exercises,

Use and Analysis of EXPLAIN for query optimization

Different SQL statement writing methods often bring about great performance differences. How can we know the overhead of SQL query execution? MySQL provides the EXPLAIN keyword for us. When you add the EXPLAIN keyword before your select statement,

In-depth explanation of basic mysql knowledge

1. Each client connection is divided into a thread belonging to the server process. The corresponding queries of the connection are all processed by this thread. 2. The Server caches the thread. Therefore, no threads are created or destroyed for

Alias for MySQL notes

You can obtain an alias for the table and field during query. This alias can replace the specified table and field. Alias for tableCopy codeThe Code is as follows:Mysql> SELECT * FROM department d-> WHERE d. d_id = 1001;+ ------ + ----------- + -----

MySQL master/Master synchronization configuration steps

MySQL master/Master synchronization Configuration Server Name IP System MySQL Odd.example.com 192.168.1.116 Rhel-5.8 5.5.16 Even.example.com 192.168.1.115 Rhel-5.8 5.5.16 Assume that the

Notes for using sphdomains in mysql to search for subdomains

Search for subdomains For example, jb51.net searches for www.jb51.net, jb51.net, and host.jb51.net. If mysql is used with like, the efficiency is very low. millions or even tens of millions of data cannot be used, so sphinx is used. Many problems

MySQL query optimization: Connection query sorting

This is the case: there are two tables, team table and people table. Each people belongs to a team and there is a field team_id in people. The following table creation statement is provided: Copy codeThe Code is as follows:Create table t_team(Id int

Solution to slow login of Intranet ssh/mysql

The development environment of a company is usually deployed on the Intranet, and then there will be public servers for developers and tests. Therefore, there is often a need to connect to the server through ssh or a local mysql client, in my

How to sort SQL complex fields by Numeric Fields

This was a long time ago problem. Last year I wrote a WP plug-in: WordPress voting plug-in Ludou Simple Vote. Some users need a Vote ranking, therefore, you need to use an SQL statement to read the list of articles sorted by score. The Ludou Simple

Modify the default encoding of mysql5.5 (the image and text steps are modified to UTF-8 encoding)

The default encoding of the mysql database is not UTF-8. After installing mysql, start the service and log on to the mysql database. Run the show variables command to view the default encoding of the mysql database: The character set of the

Solution to access pseudo-static pages in apache

1. InstallationCopy codeThe Code is as follows:./Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-ssl Apache now has a pseudo-static function called built-in pseudo-static. 2. If there is no -- enable-rewrite

Mysql xtrabackup Backup recovery implementation sharing

Introduction Xtrabackup is a mysql database backup tool provided by percona. According to the official introduction, Xtrabackup is the only open-source tool in the world that can perform hot backup for innodb and xtradb databases. Features:(1) The

Total Pages: 3233 1 .... 2750 2751 2752 2753 2754 .... 3233 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.