SQL: command types DML, DDL, DCL and TCL
Memo of the four SQL command families and the statements they group.
A memo on the four main families of SQL commands, handy to classify a statement or to discuss the permissions and transaction handling that go with it.
| Family | Full name | Commands |
|---|---|---|
| DML | Data Manipulation Language | SELECT, INSERT, UPDATE, DELETE |
| DDL | Data Definition Language | CREATE, ALTER, DROP, TRUNCATE |
| DCL | Data Control Language | GRANT, REVOKE |
| TCL | Transaction Control Language | SAVE POINT, ROLLBACK, COMMIT |
- DML reads and modifies data.
- DDL defines or changes the structure of objects (tables, indexes, views...).
- DCL manages access rights.
- TCL controls transactions.