I. Classification of SQL statements
- DDL Data Definition Language
- TPL Transaction Processing Language
- DCL Data Control Language
- DML Data Manipulation language
- SELECT
- INSERT
- UPDATE
- DELETE
Second, the importance of correct use of SQL
- Increase the efficiency of database processing and reduce the corresponding time of application
- Reduce database service load and increase server stability
- Reduce network traffic for inter-server communication
Third, development skills
- How to use the JOIN clause correctly
1.join Clauses---inside connections
SQL statement code:
2.join clause---left outer connection
SQL Statement Code:
3.join clause---right outer connection
SQL Statement Code:
4.join clauses---full connection
Note: Full join is not supported in MySQL and you can use UNION all to query a SQL statement if you want to use the all connection
SQL Statement Code:
5.join clauses---cross-linking
SQL Statement Code:
6. Updating tables with join
7. Using join to refine subqueries
optimized SQL statements:
8. Using join to refine the aggregate subquery
The SQL statement is the most common date to find out about each person's blame:
The SQL statement is an optimized SQL statement:
9. Group Selection
Group Query--row_number
NOTE: The following SQL statements are not supported in MySQL
Group Query--group by
MySQL Development Tips (i)