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
SQL server
Replace null: isnull (arg, value)
For example, select isnull (price, 0.0) from orders. If the price is null, replace it with 0.0.
Comparison with null: is not null, is null
For example, select * from orders where price is null and price
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
Today, let's take a look at common commands in MySQL (command keywords in MySQL are case insensitive ):
(1) show databases; displays all databases in MySQL
(2) create database dbname; create database dbname in MySQL
For example, we create a database
The InnoDB Engine of MySQL is configured with indexes and data cache pools. The LRU algorithm is used to maintain the cache hit rate.
The sequence table list is used as the buffer pool. Each data node is called a block.
This algorithm uses the dot-
ZookeeperThere is a mysql database table. The result of querying the last two pieces of data is as follows:
This is the content in the original table:Idname1 ad2 jk3 tre
4 hgv
This is the last two pieces of data to be queried (for the latest
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
MySQL display status information
1. show status
mysql> show status;+-----------------------------------+----------+| Variable_name | Value |+-----------------------------------+----------+| Aborted_clients | 0
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
Mysql has some time functions, although not commonly used, but sometimes used for interviews.
1. Convert the current time to the timestamp
select UNIX_TIMESTAMP();2. We generally do not directly describe the specific age about age. Because age is
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.
Because the data capacity is smaller than 20 GB, using mysqldump for full-Database Export has little impact on the business. Therefore, this mode is used to build a slave database:
PS: master-data = 1, record the Master_Log_File and
The 1064 error indicates that My SQL syntax is incorrect and the specific location of the error is displayed.
View the content to be updated and execute new php statements.
The php statement is as follows:
If (! $ Handle = @ fopen ($ fname, "r")
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
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