Skip to content

Data Manipulation Language (DML)

INSERT

With INSERT you can add data into a table

sql
INSERT INTO testtable (col1, col2, col3)
VALUES (1,'a','b'), (2,'c','d');

UPDATE

UPDATE updates the matcing rows

sql
UPDATE grades SET grade = 5 WHERE coursename = 'Databases and SQL';

WARNING

Without WHERE the UPDATE matches every row in table and will update every row

DELETE

Deletes matching row from a table

sql
DELETE FROM grades WHERE grade = 0;

WARNING

Without SELECT the DELETE matches every row in table and will delete everything

Exercises

  1. Create and drop databases and tables
  2. Copy tables
  3. Modify table structures
  4. Practice INSERT, UPDATE, DELETE safely

Lapland University of Applied Sciences

© 2026 Juha Petäjäjärvi

© 2026 Juha Petäjäjärvi