I was talking with a database administrator about different categories that SQL Commands fall into — and I thought it would be great to document here. So here you go:
ACRONYM | DESCRIPTION | SQL COMMANDS |
DML | Data Manipulation Language: SQL Statements that affect records in a table. | SELECT, INSERT, UPDATE, DELETE |
DDL | Data Definition Language: SQL Statements that create/alter a table structure | CREATE, ALTER, DROP |
DCL | Data Control Language: SQL Statements that control the level of access that users have on database objects | GRANT, REVOKE |
TCL | Transaction Control Language: SQL Statements that help you maintain the integrity of data by allowing control over transactions | COMMIT, ROLLBACK |
BONUS (Advance) QUESTION:
Is Truncate SQL command a DDL or DML? Please use comment section!
Author: Paras Doshi