Mysql tutorial Regular Expression query and instance ^ Match the start part of the string$ Match the end part of a string$ SQL = "SELECT 'fonfo 'regexp '^ fo $' from string_find "; . Match any character (including carriage return and new line)$ SQL =
Mysql tutorial Server shutdown in progress
Error code: 1053]: Server shutdown in progressProblem Analysis:When the program is running, the database tutorial server is closed.Solution:1. For VM users, contact the Space Provider to check the server
Mysql Stored Procedure instance
Mysql Stored Procedure instanceTechnical Points
A stored procedure includes a name, a list of parameters, and a set of SQL statements that can contain many SQL statements. The following is a stored procedure
MySQL Stored Procedure examples, including transactions, parameters, nested calls, cursors, loops, etc.
MySQL Stored Procedure examples, including transactions, parameters, nested calls, cursors, loops, etc.
Drop procedure if exists
SQL distinct
SQL distinct usage
You can use the DISTINCT keyword to remove rows with duplicate query results. Different queries are very useful. You just want to know whether a value table exists and you are not interested in how many times.
Mysql Optimization Configuration
Tmp_table_size: 500 mb
Key_buffer_size = 384 m // key_buffer_size specifies the buffer size used for the index. increase it to get more
Good Index processing performance. This parameter can be set to 384 M or M for
Mysql fuzzy query
Variables in double quotation marks are automatically parsed.$ SQL = "SELECT * FROM oneself WHERE name like '% {$ colname_Recordset1}' LIMIT {$ startRow_Recordset1}, {$ maxRows_Recordset1 }";$ Recordset1 = mysql_qu
Variables in
1. select the most suitable field attributeMySQL can support access to large data volumes, but generally, the smaller the table in the database, the faster the query will be executed on it. Therefore, when creating a table, we can set the field
Create an indexIndexes are especially important for applications where queries account for the majority. In many cases, the performance problem is very simple because we forget to add an index, or we have not added a more effective index. If you do
Create a stored procedure for MySQL"Pr_add" is a simple MySQL stored procedure, which has two int-type input parameters.
"A" and "B" return the sum of the two parameters.
Drop procedure if exists pr_add;
-- Calculate the sum of two numbers
Create
The group by clause allows an additional row to be added to the simple output end WITH the ROLLUP modifier. These rows represent high-level (or high aggregation) simple operations. ROLLUP allows you to answer questions from the perspective of
The following list shows the order of operator priorities from low to high. Operators in the same row have the same priority.
Operator priorityThe following list shows the order of operator priority from low to high. Operators in the same row have
We provide this mysql query page, which is fast and requires Paging for hundreds of millions of data records. Let's take a look at the detailed Writing of the mysql stored procedure.
We provide this mysql query page, which is fast and requires
The SQL NOW () function obtains the data of the current day.
In the NOW () functionReturn the current system date and time in the NOW () function.Current SQL () syntax
SELECT NOW() FROM table_name
Prod_Id
ProductName
Unit
SQL isnull (), NVL (), IFNULL () and COALESCE () functions are commonly used in SQL statements. Let's take a look at the example tutorial.
P_Id ProductName UnitPrice UnitsInStock UnitsOnOrder1 Jarlsberg 10.45 16 152 Mascarpone 32.56 233 Gorgonzola 15
SQL statements with unique constraintsThe unique constraint uniquely identifies each record in a database table.Both the uniqueness and primary constraints provide a unique column or a group of columns.A primary key constraint automatically defines
MySQL connection before you can do anything with MySQL PHP, you must first establish a MySQL database connected to your web host. This is the connection function with MySQL.
MySQL connectionBefore you can do anything with MySQL PHP, you must first
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