Mysql entry Series: SQL features in MySQL [figure] to communicate with MySQL servers, you must be familiar with SQL. For example, when using a program such as a mysql client, its function is first used as a tool for sending SQL statements to the server for execution. In addition, if you write a program using the MySQL interface provided by the programming language, you must be familiar with the SQL language because you need to send SQL statements to communicate with the server.
The "MySQL and SQL introduction" tutorial in chapter 1st introduces many MySQL functions. This chapter further studies several aspects of MySQL SQL based on this tutorial. It discusses how to reference database elements, including naming rules and applicability of case-sensitive constraints. It also introduces many more important SQL statements, such as statements for creating and deleting databases, tables, and indexes, and statements for retrieving data using connections; provides statements about database and table information. The introduction also highlights some extensions of MySQL to standard SQL.
3.1sql features in MySQL
MySQL SQL statements can be divided into several categories, as shown in 3-1. In this chapter, we will introduce the first four categories shown in-1. Some MySQL Utilities provide the basic command line interface mechanism with some SQL statements. For example, mysqlshow is an interface of the show columns statement. In this chapter, we will also introduce these equivalent items as appropriate. Some statements not described in this chapter will be described in other chapters. For example, the GRANT and REVOKE statements used to set user permissions are described in Chapter 11th "general MySQL management. The reference syntax of all statements is listed in Appendix D "SQL syntax reference. For more information, see the MySQL Reference Guide (MySQLReference Manual.
The last section of this chapter describes the functions that MySQL lacks, that is, functions that are not available in some other databases. For example, sub-selection, transaction processing, integrity of reference, trigger, stored procedure, and view. Does the lack of these features mean that MySQL is not a "real" database system? Some people think so, but according to the author's opinion, the lack of these features does not prevent a large number of people from using it. This is probably because the lack of these features does not matter for most applications. There are also solutions for other scenarios that require these features. For example, missing cascading deletion means that an additional query may be required when a record is deleted from the table. If l o c k is used
TABLES and unlock tables statements are sufficient to divide the statements into non-interrupted execution groups. the lack of support for transaction processing may not affect you. (The real problem here is not the lack of transaction processing, but the automatic rollback to cancel the failed statement. If some applications have complicated financial transaction processing, such as processing several lock statements that must be executed as a group, you may consider using a database with the ability to submit/roll back, for example, use P o s t g r e s .) Some of the missing features will be implemented in the future. For example, MySQL does not support subqueries, but it is planned to be provided in version 3. 2 4. it may have been implemented when you read this book.