← DBMS & SQL learning pathDBMS & SQL · Module 4 of 10
Changing data: DML
Add, change and remove rows with INSERT, UPDATE and DELETE.
📖 Key ideas
- INSERT INTO students (id, name) VALUES (1, 'Asha');
- UPDATE students SET name = 'Ravi' WHERE id = 1;
- DELETE FROM students WHERE id = 1;
- Always use WHERE with UPDATE and DELETE, or every row changes.
- DML = Data Manipulation Language.
💡 Real-life example: DML is daily office work: new admissions (INSERT), corrections (UPDATE), and removals (DELETE).
INSERTAdds new rows
UPDATEChanges existing rows
DELETERemoves rows
WHERELimits which rows are affected