Database / SQLite Interview questions
How do you delete a record in SQLite?
The DELETE FROM statement removes rows matching a WHERE condition — like
UPDATE, omitting the condition deletes every row in the table.
DELETE FROM person WHERE id = 1;
Deleting rows doesn't automatically shrink the database file's size on disk — the freed space inside
the file is marked available for reuse by future inserts, but the file itself doesn't get smaller until you
explicitly run VACUUM, which rebuilds the database file to reclaim that unused space.
More Related questions...