The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →SQL statements fall into two broad jobs. Some build or reshape the containers that hold data, and others work with the data inside those containers. Keeping that split in mind makes most SQL commands easier to read, and it explains why a single mistake in one group can do far more damage than a mistake in the other.
The short answer
DDL (Data Definition Language) is the part of SQL that defines or changes database structures such as tables. DML (Data Manipulation Language) is the part that works with the rows stored in those structures. In the building-and-running picture, DDL is the construction crew that lays out rooms and walls, and DML is the daily activity of putting things in those rooms, finding them, and moving them around.
As an Amazon Associate I earn from qualifying purchases.
Building: what DDL does
Microsoft Learn describes DDL statements as those that define data structures, and the core commands are CREATE, ALTER, and DROP (Microsoft Learn, Transact-SQL statements, updated 21 September 2026). Oracle’s reference uses the same idea, describing DDL in terms of operations on schema objects (Oracle Database 18c SQL Language Reference, Types of SQL Statements).
- CREATE makes a new object, such as a table, with a chosen set of columns.
- ALTER changes an existing object’s shape, for example by adding or modifying a column.
- DROP removes the object entirely, along with the data it holds.
Running: what DML does
DML works with data stored in database objects. The common statements are INSERT, UPDATE, and DELETE. Microsoft SQL Server also lists SELECT and MERGE as DML statements (Microsoft Learn, Queries).
#1 Best Overall
- INSERT adds new rows.
- UPDATE changes values in rows that already exist.
- DELETE removes rows while leaving the table itself in place.
- SELECT reads rows without changing them.
- MERGE combines insert, update, and delete logic into one statement based on a match condition.
A worked example
The sequence below shows both jobs in order. The syntax is illustrative. Exact details, such as data type names and the handling of quotes, can differ between database products.
- Build the table:
CREATE TABLE customers (id INT, name VARCHAR(100));This is DDL. Nothing is stored yet except the definition. - Add a row:
INSERT INTO customers (id, name) VALUES (1, 'Ada');This is DML. - Change a value:
UPDATE customers SET name = 'Ada Lovelace' WHERE id = 1;This is DML, and the table’s columns are unchanged. - Read it back:
SELECT id, name FROM customers;This is DML in SQL Server’s classification.
Notice that steps 2 through 4 never alter the table’s shape. Only step 1 does.
Comparing the two groups
| Question | DDL | DML |
|---|---|---|
| What does it act on? | Structure of database objects, such as tables | Data stored in those objects |
| Typical operations | Create, alter, drop | Insert, update, delete, and (in SQL Server) select and merge |
| Representative command | CREATE TABLE |
INSERT |
| Effect on existing rows | Can remove them along with the object, or change how they are stored, depending on the statement | Changes only the rows the statement targets |
Where the classification gets blurry
Product documentation does not agree on every label. Microsoft SQL Server lists SELECT as DML. Oracle’s reference describes SELECT as a limited form of DML because it accesses data, which is a different framing from calling it simply a data-manipulation statement (Oracle Database 18c SQL Language Reference). Both descriptions are consistent with the core idea that DML is about data rather than structure. When you read a book or a vendor manual, check which convention it uses. Most readers will run into this question when they see SELECT in a list of “data” commands.
Why the distinction matters in practice
Because DDL changes structure, its effects reach beyond a single row. Microsoft’s Access documentation warns that data-definition queries can inadvertently change table design or lose data, and it recommends backing up the tables involved before you run one (Microsoft Support, Data-definition queries in Access). That advice is specific to Access. It is a good habit anywhere, but the exact recovery options depend on the database system you use.
A practical rule follows from the split. Before running a DDL statement, confirm which object it targets and whether a backup exists. Before running a DML statement that changes rows, confirm the WHERE condition, because an UPDATE or DELETE without one applies to every row in the table.
A quick way to remember it
Ask what the statement is touching. If the answer is the table’s columns, indexes, or existence, it is DDL. If the answer is the rows, it is DML. Statements that only read rows, such as SELECT, sit in the DML group in most references, with the Oracle caveat above.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems




