DDL vs DML: Understanding the Two Core Categories of SQL Commands
SQL commands are broadly divided into categories, with DDL (Data Definition Language) and DML (Data Manipulation Language) being the most fundamental. DDL commands like CREATE, ALTER, DROP, and TRUNCATE define and modify the structure of database objects such as tables and indexes, and are typically auto-committed, meaning changes cannot be rolled back. DML commands like SELECT, INSERT, UPDATE, and DELETE operate on the data stored within those structures, and are transactional, allowing changes to be committed or rolled back. Two additional categories also exist: DCL (Data Control Language) manages user permissions via GRANT and REVOKE, while TCL (Transaction Control Language) handles the management of DML transactions. Understanding the distinction between these command types is considered a foundational step in learning SQL.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in