Schema and data

Insert, update, and delete rows

Use ordinary SQL to change SQLite data and always make the target of an update or delete explicit.

8 minute lesson

~~~

SQLite uses the same basic data-changing statements you learned in the SQL course:

INSERT INTO notes (title) VALUES ('Plan the week');
UPDATE notes SET title = 'Plan Monday' WHERE id = 1;
DELETE FROM notes WHERE id = 1;

Run the matching SELECT first when a WHERE clause affects important data.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →