Part 3 of 5 · 1 min read
DML: working with data
Statements that read or change the rows inside an already-existing structure.
Think of actually putting a sheet of paper into a drawer that already exists, or taking one out.
In plain words: Data Manipulation Language statements read or change the rows inside tables that already exist. SELECT, INSERT, UPDATE and DELETE, all covered on the previous page, are DML. They never change a table's structure.
A worked example. Applying the new discount column to one specific book is DML, since the column itself already exists by the time this statement runs.
The key lines.
UPDATE books SET discount_percent = 10 WHERE book_id = 42;
DML
Data Manipulation Language (DML) covers statements that read or change row data within an existing structure. SELECT, INSERT, UPDATE and DELETE are DML commands.
Example: UPDATE books SET discount_percent = 10 ... is DML, since it changes a row's value, not the table's structure.