Single lesson · Written for AQA GCSE Computer Science (8525)

SQL: INSERT, UPDATE and DELETE – AQA GCSE Computer Science lesson (8525)

Pupils learn to use SQL to insert, update and delete records.

Also in a bundle Software, Translators and Databases – AQA GCSE Computer Science lessons (8525) 14 lessons for £39 · save 30% on buying separately

Lesson 9 of 14 in unit 11.2 Software, Translators and Databases, taught in Year 11, Autumn 2. It answers one big question: How do we change the data in a database?

By the end, pupils can use SQL to insert, update and delete records.

The Build (the main task)
Write SQL to add a new pet to the Pet table: PetID 13, a dog called Olive, weighing 9.5 kg, not vaccinated, owned by OwnerID 102. (3 marks) Write SQL to change pet 12's weight to 6.2. (3 marks) Write SQL to delete pet 7's record. (2 marks)
Support version
Statement frames for INSERT INTO … VALUES, UPDATE … SET … WHERE and DELETE FROM … WHERE.
Challenge
Explain what would happen if the WHERE clause were left off the UPDATE statement in part (b). (2 marks) Max (PetID 4) has been vaccinated and now weighs 30.2 kg. Write one SQL statement that makes both changes. (3 marks) Mia Smith (OwnerID 104) has moved away and her pets are no longer registered. Write the SQL to delete her pets' records and then her own record, and explain why the pets' records are deleted first. (4 marks)
Real-world link
Keeping the vets' records up to date.
Key words
INSERT INTO, UPDATE and DELETE, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“UPDATE without WHERE changes one record”; “INSERT INTO values can be in any order”.
AQA 8525 specification
3.7.2 (SQL: SELECT, FROM, WHERE, ORDER BY, INSERT, UPDATE, DELETE).

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Also sold in the Software, Translators and Databases unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Single-teacher licence: use and adapt it with your own classes

More for GCSE Computer Science (AQA)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.