One SQL master table record corresponds to multiple record statements in the attached table
In this case, we will use
Union statement
SQL union syntax
Select column_name (s) from table_name1
Union
Select column_name (s) from table_name2
Join
Use winrar to regularly back up the mysql tutorial database.For mysql backup, the best way is to back up the data directory of the mysql database directly. The following provides a method for using winrar to regularly back up the data
Merge and sort the records of multiple tables as follows:
Select * from (select * from Table
UnionSelect * from Table B
UnionSelect * Table c) as h order by h. List desc
In the database tutorial, the union and union all keywords combine
Mysql tutorial this function has none of deterministicThis function has none of deterministic, no SQL, or reads SQL data in its declaration and binary logging is enabled (you * might * want to use the less safe log_bin_trust_function_creators
How to Write a trigger in the mysql tutorial */
Trigger_name: name of the trigger. My commonly used naming rules are t_name_tablename _ (B | a) (I | u | d), t: trigger ID, name: English name, tablename: Table name, B (before): before the event is
MySql stored procedure creation and deletion and instance
The stored procedure in the mysql tutorial is a stored procedure with parameters (dynamic execution of SQL statements). The Stored Procedure in mysql queries user information based on user
If you are in mysql version 5 or later, I want to tell you that there are three mysql paging Stored Procedure instances. The stored procedure is supported only after mysql 5.0, now let's take a look at this stored procedure and look at a simple
Mysql tutorial Stored Procedure syntax
Variable definition:
Declare variable_name [, variable_name...] datatype [default value];
Datatype is the data type of mysql, such as int, float, date, varchar (length)
Example:
Declare l_int int unsigned
This article mainly introduces how to add new users to your MySQL database. Because a mysql may have many databases, we need to grant permissions to different databases and enable users, this is necessary.
How to add a new user to your mysql
SQL statements for obtaining the maximum and minimum values
SQL statements for obtaining the maximum and minimum values
If object_id ('tb') is not null drop table tb;GoCreate table tb (Col1 int,Col2 int,Fcount int)Insert into tbSelect 11,20, 1
Mysqldata warehouse contains many types of mysqldata warehouse. Next we will introduce the tool and directly back up data in mysql.exe.
Mysql tutorial database tutorial backup methodThere are many types of mysqldata warehouse backups. Next we will
Mysql import database and Database Import
Mysql tutorial import database tutorial and Database Import/*Currently, mysql supports the following free backup tools:
Mysqldump and mysqlhotcopy
You can also back up data using SQL Syntax:
Backup table
This article has added three methods for enabling mysql remote connection. The first method is to enable mysql remote connection at the mysql cmd command prompt. The third method is to modify mysql my. ini file configuration.
This article adds three
Create database database_name to allow PHP to execute the preceding statement, we must use the mysql_query () function. This function is used to send queries or commands to MySQL connections.
Mysql tutorial create database tutorial commands and
In fact, it is to tell the mysql tutorial interpreter whether the command has ended and whether mysql can be executed.By default, delimiter is a semicolon ;. In the command line client, if a command line ends with a semicolon,After you press enter,
For the first execution, the data is not cached in the memory and needs to be read from the hard disk, so it will be very slow. In the second execution, the data has already entered the memory, so it does not need to be read from the hard disk and
Update statement
The Update statement is used to modify data in a table.Syntax:
UPDATE table name SET column name = new value WHERE column name = A ValuePerson:
LastName
FirstName
Address
City
Gates
Bill
Mysql tutorial paging optimization code for massive dataPage indicates the page number.Pagesize indicates the number of entries displayed on each page.Conditon indicates some conditions view sourceprint? 1 select * from table where conditon order by
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