https://dev.mysql.com/doc/refman/5.7/en/glossary.html#glos_ddl
SQL
The Structured Query Language that is standard for performing database operations. Often divided into the categories DDL, DML, and queries. MySQL includes some additional statement categories such as replication. See Chapter 10, Language Structure for the building blocks of SQL syntax,Chapter 12, Data Types for the data types to use for MySQL table columns, Chapter 14, SQL Statement Syntax for details about SQL statements and their associated categories, and Chapter 13, Functions and Operators for standard and MySQL-specific functions to use in queries.
See Also DDL, DML, query, replication.
DCL
Data control language, a set of SQL statements for managing privileges. In MySQL, consists of the GRANT
and REVOKE
statements. Contrast with DDL andDML.
DML
Data manipulation language, a set of SQL statements for performing INSERT
, UPDATE
, and DELETE
operations. The SELECT
statement is sometimes considered as a DML statement, because the SELECT ... FOR UPDATE
form is subject to the same considerations for locking as INSERT
, UPDATE
, and DELETE
.
DML statements for an InnoDB
table operate in the context of a transaction, so their effects can be committed or rolled back as a single unit.
Contrast with DDL and DCL.
See Also commit, DCL, DDL, locking, rollback, SQL, transaction.
DDL
Data definition language, a set of SQL statements for manipulating the database itself rather than individual table rows. Includes all forms of theCREATE
, ALTER
, and DROP
statements. Also includes the TRUNCATE
statement, because it works differently than a DELETE FROM
statement, even though the ultimate effect is similar.table_name
DDL statements automatically commit the current transaction; they cannot be rolled back.
The InnoDB
online DDL feature enhances performance for CREATE INDEX
, DROP INDEX
, and many types of ALTER TABLE
operations. See Section 15.13, “InnoDB and Online DDL” for more information. Also, the InnoDB
file-per-table setting can affect the behavior of DROP TABLE
and TRUNCATE TABLE
operations.
Contrast with DML and DCL.
See Also commit, DCL, DML, file-per-table, rollback, SQL, transaction.