MySQL :: MySQL 5.7 Reference Manual :: 1.8.1 MySQL Extensions to Standard SQL

MySQL :: MySQL 5.7 Reference Manual :: 1.8.1 MySQL Extensions to Standard SQL Contact MySQL  |  Login  |  Register The world's most popular open source database MySQL.com Downloads Documentation Developer Zone Developer Zone Downloads MySQL.com Documentation MySQL Server MySQL Enterprise Workbench Router Utilities/Fabric MySQL NDB Cluster Connectors More MySQL.com Downloads Developer Zone Section Menu:   Documentation Home MySQL 5.7 Reference Manual Preface and Legal Notices General Information About This Manual Typographical and Syntax Conventions Overview of the MySQL Database Management System What is MySQL? The Main Features of MySQL History of MySQL What Is New in MySQL 5.7 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 5.7 MySQL Information Sources MySQL Mailing Lists Guidelines for Using the Mailing Lists MySQL Community Support at the MySQL Forums MySQL Community Support on Internet Relay Chat (IRC) MySQL Enterprise How to Report Bugs or Problems MySQL Standards Compliance MySQL Extensions to Standard SQL MySQL Differences from Standard SQL SELECT INTO TABLE Differences UPDATE Differences Foreign Key Differences '--' as the Start of a Comment How MySQL Deals with Constraints PRIMARY KEY and UNIQUE Index Constraints FOREIGN KEY Constraints Constraints on Invalid Data ENUM and SET Constraints Credits Contributors to MySQL Documenters and translators Packages that support MySQL Tools that were used to create MySQL Supporters of MySQL Installing and Upgrading MySQL Using MySQL as a Document Store Tutorial MySQL Programs MySQL Server Administration Security Backup and Recovery Optimization Language Structure Globalization Data Types Functions and Operators SQL Statement Syntax The InnoDB Storage Engine Alternative Storage Engines High Availability and Scalability Replication MySQL NDB Cluster 7.5 Partitioning Stored Programs and Views INFORMATION_SCHEMA Tables MySQL Performance Schema MySQL sys Schema Connectors and APIs Extending MySQL MySQL Enterprise Edition MySQL Workbench MySQL 5.7 Frequently Asked Questions Errors, Error Codes, and Common Problems Restrictions and Limits Indexes MySQL Glossary Related Documentation MySQL 5.7 Release Notes Download this Manual PDF (US Ltr) - 35.7Mb PDF (A4) - 35.7Mb PDF (RPM) - 34.7Mb EPUB - 8.7Mb HTML Download (TGZ) - 8.5Mb HTML Download (Zip) - 8.5Mb HTML Download (RPM) - 7.3Mb Eclipse Doc Plugin (TGZ) - 9.3Mb Eclipse Doc Plugin (Zip) - 11.5Mb Man Pages (TGZ) - 203.5Kb Man Pages (Zip) - 308.9Kb Info (Gzip) - 3.3Mb Info (Zip) - 3.3Mb Excerpts from this Manual MySQL Backup and Recovery MySQL Globalization MySQL Information Schema MySQL Installation Guide MySQL and Linux/Unix MySQL and OS X MySQL Partitioning MySQL Performance Schema MySQL Replication Using the MySQL Yum Repository MySQL Restrictions and Limitations Security in MySQL MySQL and Solaris Building MySQL from Source Starting and Stopping MySQL MySQL Tutorial MySQL and Windows MySQL Cluster NDB 7.5 version 5.7 8.0 5.6 5.5 5.6  Japanese MySQL 5.7 Reference Manual  /  ...  /  General Information  /  MySQL Standards Compliance  /  MySQL Extensions to Standard SQL 1.8.1 MySQL Extensions to Standard SQL MySQL Server supports some extensions that you probably will not find in other SQL DBMSs. Be warned that if you use them, your code will not be portable to other SQL servers. In some cases, you can write code that includes MySQL extensions, but is still portable, by using comments of the following form: /*! MySQL-specific code */ In this case, MySQL Server parses and executes the code within the comment as it would any other SQL statement, but other SQL servers will ignore the extensions. For example, MySQL Server recognizes the STRAIGHT_JOIN keyword in the following statement, but other servers will not: SELECT /*! STRAIGHT_JOIN */ col1 FROM table1,table2 WHERE ... If you add a version number after the ! character, the syntax within the comment is executed only if the MySQL version is greater than or equal to the specified version number. The KEY_BLOCK_SIZE clause in the following comment is executed only by servers from MySQL 5.1.10 or higher: CREATE TABLE t1(a INT, KEY (a)) /*!50110 KEY_BLOCK_SIZE=1024 */; The following descriptions list MySQL extensions, organized by category. Organization of data on disk MySQL Server maps each database to a directory under the MySQL data directory, and maps tables within a database to file names in the database directory. This has a few implications: Database and table names are case sensitive in MySQL Server on operating systems that have case-sensitive file names (such as most Unix systems). See Section 10.2.2, “Identifier Case Sensitivity” . You can use standard system commands to back up, rename, move, delete, and copy tables that are managed by the MyISAM storage engine. For example, it is possible to rename a MyISAM table by renaming the .MYD, .MYI, and .frm files to which the table corresponds. (Nevertheless, it is preferable to use RE