Chapter 13th grouping DataThis chapter describes how to group data so that you can summarize subsets of table content. This involves two new select sentence sentences, the GROUP BY clause and the HAVING clause, respectively.13.1 Data groupingAs you
I. Using SQL hintsSQL hint (SQL hint) is an important means to optimize the database, is to add some artificial hints in the SQL statement to achieve the purpose of optimization operations.1.1 Use IndexAfter the table name in the query statement,
Note: Original address: https://www.cnblogs.com/hezhuoheng/p/9366630.htmlThe most important of these is the three principles: the command entered in sequence, removed the INI (this is not a principle, it is a way for me to solve the problem), to
a thingTransactions are used to manipulate multiple SQL for some operations as atomic, and once an error occurs, it can be rolled back to its original state, guaranteeing database data integrity.CREATE table user (ID int primary key
16th-Create an advanced junctionThis chapter explains the other types of joins (including their meanings and how to use them), and describes how to use table aliases and aggregate functions for joined tables.16.1 Using table AliasesThe 10th chapter
One, stored procedures1, definition: A set of programmable functions, is to complete a specific function of the SQL statement set, compiled and saved in the database, the user can specify the name of the stored procedure and given parameters (when
First, the successful index optimization
1. The table data is as follows:
2. The query statement is as follows:
Explain select ID, age, level from employee where Dpid = 1 and age = of order BY
Extra:using where; Using Filesort
Use the show statement to find out what database currently exists on the server: show DATABASES;Create a database abccs:create databases test12;Select the database you created: Use test12Creating a database table: CREATE table student ();We want to
The traditional operations in relational data operations--and (UNION), Cartesian product (Cartesian product), connection (join).1. and (UNION)" and " is to merge tables with the same number of fields and the same field type.Number of records merged =
One, why use trigger 1. What is a trigger
Triggers are one of the MySQL database objects that need to be declared, executed, etc., the execution of the trigger is not called by the program, nor is it started manually, but is triggered and
First, insert data recordTipDesc table_name 查看表信息及字段类型避免插入类型不一致。1. Insert full data recordBasic syntaxINSERT INTO table_name( field1, field2, field3, ......fieldn) VALUES( value1, value2, value3, ......valuen) OrINSERT INTO table_name
The first step, download MySQL1, Address: https://dev.mysql.com/downloads/mysql/2. Version: Mysql-8.0.11-winx64.zipSecond step, decompression Modify/Create configuration file1. If you want MySQL to be installed in the specified directory, then move
Stored ProceduresDefinition of a stored procedureSecond, the advantages of stored proceduresThird, the use of stored procedures3.1 Creation and invocation of stored procedures3.2 Viewing and deletion of stored proceduresThe definition of a stored
Grant all privileges the test_db.* to [e-mail protected] identified by ' 123456 ';Grant all on test_db.* to [e-mail protected] identified by ' 123456 ';Grant Select,insert,update,delete on * * to [e-mail protected] "%" identified by ' 123456
Using the master-slave replication technology provided by MySQL itself, in the enterprise production scenario, it is possible to make multiple automatic backups of the log data, and realize the expansion of the database. For example, in a scheduled
30th-Improving performanceThis chapter will review some of the key points related to MySQL performance.30.1 Improving performanceDatabase administrators spend a considerable portion of their lives tuning, experimenting to improve DBMS performance.
19th Chapter-Inserting dataThis chapter describes how to insert data into a table using an INSERT statement from SQL.19.1 Data InsertionThere is no doubt that select is the most commonly used SQL statement (which is why the first 17 chapters are
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