Skip to Main Content
The world's most popular open source database
Contact MySQL
|
Login
|
Register
MySQL.com
Downloads
Documentation
Developer Zone
Developer Zone
Downloads
MySQL.com
Documentation
MySQL Server
MySQL Enterprise
Workbench
InnoDB Cluster
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
Installing and Upgrading MySQL
Tutorial
MySQL Programs
MySQL Server Administration
Security
Backup and Recovery
Optimization
Language Structure
Character Sets, Collations, Unicode
Data Types
Functions and Operators
SQL Statements
Data Definition Statements
ALTER DATABASE Statement
ALTER EVENT Statement
ALTER FUNCTION Statement
ALTER INSTANCE Statement
ALTER LOGFILE GROUP Statement
ALTER PROCEDURE Statement
ALTER SERVER Statement
ALTER TABLE Statement
ALTER TABLE Partition Operations
ALTER TABLE and Generated Columns
ALTER TABLE Examples
ALTER TABLESPACE Statement
ALTER VIEW Statement
CREATE DATABASE Statement
CREATE EVENT Statement
CREATE FUNCTION Statement
CREATE INDEX Statement
CREATE LOGFILE GROUP Statement
CREATE PROCEDURE and CREATE FUNCTION Statements
CREATE SERVER Statement
CREATE TABLE Statement
Files Created by CREATE TABLE
CREATE TEMPORARY TABLE Statement
CREATE TABLE ... LIKE Statement
CREATE TABLE ... SELECT Statement
FOREIGN KEY Constraints
Silent Column Specification Changes
CREATE TABLE and Generated Columns
Secondary Indexes and Generated Columns
Setting NDB Comment Options
CREATE TABLESPACE Statement
CREATE TRIGGER Statement
CREATE VIEW Statement
DROP DATABASE Statement
DROP EVENT Statement
DROP FUNCTION Statement
DROP INDEX Statement
DROP LOGFILE GROUP Statement
DROP PROCEDURE and DROP FUNCTION Statements
DROP SERVER Statement
DROP TABLE Statement
DROP TABLESPACE Statement
DROP TRIGGER Statement
DROP VIEW Statement
RENAME TABLE Statement
TRUNCATE TABLE Statement
Data Manipulation Statements
CALL Statement
DELETE Statement
DO Statement
HANDLER Statement
INSERT Statement
INSERT ... SELECT Statement
INSERT ... ON DUPLICATE KEY UPDATE Statement
INSERT DELAYED Statement
LOAD DATA Statement
LOAD XML Statement
REPLACE Statement
SELECT Statement
SELECT ... INTO Statement
JOIN Clause
UNION Clause
Subqueries
The Subquery as Scalar Operand
Comparisons Using Subqueries
Subqueries with ANY, IN, or SOME
Subqueries with ALL
Row Subqueries
Subqueries with EXISTS or NOT EXISTS
Correlated Subqueries
Derived Tables
Subquery Errors
Optimizing Subqueries
Rewriting Subqueries as Joins
Restrictions on Subqueries
UPDATE Statement
Transactional and Locking Statements
START TRANSACTION, COMMIT, and ROLLBACK Statements
Statements That Cannot Be Rolled Back
Statements That Cause an Implicit Commit
SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT Statements
LOCK TABLES and UNLOCK TABLES Statements
SET TRANSACTION Statement
XA Transactions
XA Transaction SQL Statements
XA Transaction States
Restrictions on XA Transactions
Replication Statements
SQL Statements for Controlling Replication Source Servers
PURGE BINARY LOGS Statement
RESET MASTER Statement
SET sql_log_bin Statement
SQL Statements for Controlling Replica Servers
CHANGE MASTER TO Statement
CHANGE REPLICATION FILTER Statement
RESET SLAVE Statement
SET GLOBAL sql_slave_skip_counter Syntax
START SLAVE Statement
STOP SLAVE Statement
SQL Statements for Controlling Group Replication
START GROUP_REPLICATION Statement
STOP GROUP_REPLICATION Statement
Prepared Statements
PREPARE Statement
EXECUTE Statement
DEALLOCATE PREPARE Statement
Compound Statements
BEGIN ... END Compound Statement
Statement Labels
DECLARE Statement
Variables in Stored Programs
Local Variable DECLARE Statement
Local Variable Scope and Resolution
Flow Control Statements
CASE Statement
IF Statement
ITERATE Statement
LEAVE Statement
LOOP Statement
REPEAT Statement
RETURN Statement
WHILE Statement
Cursors
Cursor CLOSE Statement
Cursor DECLARE Statement
Cursor FETCH Statement
Cursor OPEN Statement
Restrictions on Server-Side Cursors
Condition Handling
DECLARE ... CONDITION Statement
DECLARE ... HANDLER Statement
GET DIAGNOSTICS Statement
RESIGNAL Statement
SIGNAL Statement
Scope Rules for Handlers
The MySQL Diagnostics Area
Condition Handling and OUT or INOUT Parameters
Restrictions on Condition Handling
Database Administration Statements
Account Management Statements
ALTER USER Statement
CREATE USER Statement
DROP USER Statement
GRANT Statement
RENAME USER Statement
REVOKE Statement
SET PASSWORD Statement
Table Maintenance Statements
ANALYZE TABLE Statement
CHECK TABLE Statement
CHECKSUM TABLE Statement
OPTIMIZE TABLE Statement
REPAIR TABLE Statement
Plugin and Loadable Function Statements
CREATE FUNCTION Statement for Loadable Functions
DROP FUNCTION Statement for Loadable Functions
INSTALL PLUGIN Statement
UNINSTALL PLUGIN Statement
SET Statements
SET Syntax for Variable Assignment
SET CHARACTER SET Statement
SET NAMES Statement
SHOW Statements
SHOW BINARY LOGS Statement
SHOW BINLOG EVENTS Statement
SHOW CHARACTER SET Statement
SHOW COLLATION Statement
SHOW COLUMNS Statement
SHOW CREATE DATABASE Statement
SHOW CREATE EVENT Statement
SHOW CREATE FUNCTION Statement
SHOW CREATE PROCEDURE Statement
SHOW CREATE TABLE Statement
SHOW CREATE TRIGGER Statement
SHOW CREATE USER Statement
SHOW CREATE VIEW Statement
SHOW DATABASES Statement
SHOW ENGINE Statement
SHOW ENGINES Statement
SHOW ERRORS Statement
SHOW EVENTS Statement
SHOW FUNCTION CODE Statement
SHOW FUNCTION STATUS Statement
SHOW GRANTS Statement
SHOW INDEX Statement
SHOW MASTER STATUS Statement
SHOW OPEN TABLES Statement
SHOW PLUGINS Statement
SHOW PRIVILEGES Statement
SHOW PROCEDURE CODE Statement
SHOW PROCEDURE STATUS Statement
SHOW PROCESSLIST Statement
SHOW PROFILE Statement
SHOW PROFILES Statement
SHOW RELAYLOG EVENTS Statement
SHOW SLAVE HOSTS Statement
SHOW SLAVE STATUS Statement
SHOW STATUS Statement
SHOW TABLE STATUS Statement
SHOW TABLES Statement
SHOW TRIGGERS Statement
SHOW VARIABLES Statement
SHOW WARNINGS Statement
Other Administrative Statements
BINLOG Statement
CACHE INDEX Statement
FLUSH Statement
KILL Statement
LOAD INDEX INTO CACHE Statement
RESET Statement
SHUTDOWN Statement
Utility Statements
DESCRIBE Statement
EXPLAIN Statement
HELP Statement
USE Statement
The InnoDB Storage Engine
Alternative Storage Engines
Replication
Group Replication
MySQL Shell
Using MySQL as a Document Store
InnoDB Cluster
MySQL NDB Cluster 7.5 and NDB Cluster 7.6
Partitioning
Stored Objects
INFORMATION_SCHEMA Tables
MySQL Performance Schema
MySQL sys Schema
Connectors and APIs
MySQL Enterprise Edition
MySQL Workbench
MySQL 5.7 Frequently Asked Questions
Error Messages and Common Problems
Indexes
MySQL Glossary
Related Documentation
MySQL 5.7 Release Notes
Download this Manual
PDF (US Ltr)
- 34.8Mb
PDF (A4)
- 34.9Mb
Man Pages (TGZ)
- 237.4Kb
Man Pages (Zip)
- 347.7Kb
Info (Gzip)
- 3.4Mb
Info (Zip)
- 3.4Mb
Excerpts from this Manual
MySQL Backup and Recovery
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
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 NDB Cluster 7.5
version 5.7
8.1
8.0 current
8.0 Japanese
MySQL 5.7 Reference Manual
/
SQL Statements
/ Data Manipulation Statements
13.2 Data Manipulation Statements
13.2.1 CALL Statement
13.2.2 DELETE Statement
13.2.3 DO Statement
13.2.4 HANDLER Statement
13.2.5 INSERT Statement
13.2.6 LOAD DATA Statement
13.2.7 LOAD XML Statement
13.2.8 REPLACE Statement
13.2.9 SELECT Statement
13.2.10 Subqueries
13.2.11 UPDATE Statement
PREV
HOME
UP
NEXT
Related Documentation
MySQL 5.7 Release Notes
Download this Manual
PDF (US Ltr)
- 34.8Mb
PDF (A4)
- 34.9Mb
Man Pages (TGZ)
- 237.4Kb
Man Pages (Zip)
- 347.7Kb
Info (Gzip)
- 3.4Mb
Info (Zip)
- 3.4Mb
Excerpts from this Manual
MySQL Backup and Recovery
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
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 NDB Cluster 7.5