SQL UPDATE and DELETE
UPDATE changes field values and DELETE FROM removes records. Always add WHERE so only the chosen records change. Without it, every record in the table is changed or deleted.
Understanding SQL UPDATE and DELETE in VCE Spreadsheets, SQL & Visualisation
What it does: UPDATE with SET changes the email field, and WHERE id = 12 targets just one record. DELETE FROM without WHERE removes all records in the table. SQL does not guess which record you meant. Use WHERE with a unique value like a primary key so only the one booking is removed. The second statement wipes the whole table. The order matters: UPDATE, then SET, then WHERE. Putting WHERE before SET causes a syntax error.
Common mistakes: SQL uses a single = to give a field its new value in SET. The line should be SET year = 10. Text values must be in quotes. Without them, SQL treats sent as a field name. It should be SET status = 'sent'.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 55–70) and word search (Modules 55–86).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
UPDATE table SET field = value WHERE condition;Fill in the Blanks
Spot the Error
Student with a class code? Join your class →