SQLMentor // glossary

DML (Data Manipulation Language)

DML is the subset of SQL that reads and changes the data inside tables — SELECT, INSERT, UPDATE, DELETE, and MERGE. DML changes run inside a transaction and can be rolled back.

DML operates on rows, not structure. Unlike DDL, DML statements do not auto-commit: changes stay pending until you COMMIT, and can be undone with ROLLBACK — the foundation of transactional safety.

MERGE (sometimes called upsert) combines insert and update in one atomic statement based on whether a matching row already exists.

Example

INSERT INTO employees (employee_id, first_name) VALUES (301, 'Ada');
UPDATE employees SET salary = 9000 WHERE employee_id = 301;
DELETE FROM employees WHERE employee_id = 301;