This article mainly summarizes the MySQL index operation methods, including creating indexes, rebuilding indexes, querying indexes, and deleting indexes. In the following example, 'table _ name' indicates the data table name, 'index _ name'
Number of statistical data rowsThe select count () FROM syntax is used to COUNT the number of rows in a data table.Syntax:Select count (column) FROM tb_nameThis SQL syntax is used to COUNT the number of rows in a certain field. COUNT () cannot
1.1.1. An error is reported during datadir migration of mysql5.6.14.
[Environment description]
Perconamysql 5.6.14 is installed on machine A. When the database is stopped and started normally, the datadir path is pathA and application database
1. Information_schemainformation_schema is the mysql information database. You can use this database to view the databases, tables, permissions, and other information under mysql. This database is generated by default in the database.
Mysql> select * from;+ ---- + ------ + -------------- +| Id | name | descri |+ ---- + ------ + -------------- +| 1 | a1 | I am the first a1 || 2 | a2 | I am the first a2 || 3 | a3 | I am a3 || 4 | a1 | I am the second a1 || 5 | a2 | I am the second
My experiences with MYSQL (1)
My experiences with MYSQL (2)
My experiences with MYSQL (III)
MYSQLBLOB Data Type in
BLOB is a large binary object used to store a variable amount of data. BLOB types include TinyBlob, Blob, MediumBlob, and
SQL multi-table join query instance
The following provides four SQL multi-table join query instances, with different efficiency.
Select * from order_info as a, ivrlog4ivrdlvinst as B
Where
(A. saleorder = B. ext1_skill and B. start_date = @ date1
SQL group by syntax and example
Group by statement
The group by statement is used in combination with the aggregate function to group result sets based on one or more columns.
SQL group by syntax
Select column_name, aggregate_function
How to use SQL statements to determine whether a known table exists
A: The solution is as follows:
Note: The following code is a module that typically references Dao.
Function fExistTable (strTableName As String) As Integer
Dim db As Database
Dim I
I have been using MYSQL for a while. Because the company uses SQLSERVER and MYSQL, and the number of servers and databases is large
It is difficult to manage. I have been comparing it with SQLSERVER during MYSQL learning.
The first phase is
=========================================, Change the root password1. Disable the mysql service.Killall-TERM mysqld2. modify the configuration fileVi/etc/my. cnfIn the [mysqld] section, add skip-grant-tables.For example:[Mysqld]Datadir
In the past, oracle databases were used for enterprise projects and mysql was used for new company projects.
1 In windows, mysql is case-insensitive by default. To make mysql case-insensitive. Change Method
Find the my. ini file in the mysql
MySQL in Linux is case-sensitive by default. You can use the following settings to make MySQL case-insensitive:1. Log On with root and modify/etc/my. cnf;2. Add a row under the [mysqld] node: lower_case_table_names = 13. Restart MySQL;
The
Copy codeThe Code is as follows:Create definer = 'root' @ 'localhost' PROCEDURE 'createbusiness '(parameter1 int)BEGIN# Routine body goes here...DECLARE flag int DEFAULT parameter1; # DECLARE the variable flag and assign the parameter value to the
I. Syntax
EXPLAIN select sid,filename,filetype from (SELECT * from by_disk_file where uid=830814) a
Result:
Id: indicates the SQL Execution sequence. The SQL statements are executed from large to small.
Select_type: Query type, which can be:
1.
Garbled characters occur in Chinese when MySQL databases are used in the project (are all Chinese characters changed ?) Solution:
1. unified project and database coding, the project uses UTF-8, So I unified the database coding into UTF-8
By default, MySQL search is case-insensitive (however, some character sets are always case-sensitive, such as czech ). This means that if you use col_name LIKE 'a % 'for search, you will get all columns starting with a or. If you want to make the
The static format is the default storage format of the MyISAM table. This format is used when the table does not contain variable length columns (VARCHAR, BLOB, or TEXT. Each row is stored with a fixed number of nodes.
Among the three storage
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.