AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Structured query language (SQL): DELETE FROM table_name WHERE condition
This SQL statement removes rows from an existing table.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 10 of 10
Study notes
From the checked teaching notes for this specification point.
The idea
This SQL statement removes rows from an existing table. DELETE FROM names the table whose rows will be removed; the WHERE clause then selects which rows qualify, for example DELETE FROM Students WHERE Year = 11 removes only Year 11 rows. Without WHERE, every row is deleted while the table structure remains. The statement does not remove the table itself, its columns or its definition, so the table still exists afterwards and can receive new rows. Learners should read each option carefully: a correct answer must name the table after FROM and give a condition that matches only the intended rows, and must not confuse row deletion with dropping a table or with changing stored values.
What earns the marks
- Identifies DELETE FROM as the clause that removes rows from the named table.
- Recognises that the WHERE clause restricts deletion to rows meeting the stated condition.
- Distinguishes deleting rows from deleting the table structure or its columns.
- Rejects an option that omits WHERE when only some rows should be removed, because all rows would be deleted.
- Confirms the table name follows FROM and the condition follows WHERE in the correct order.
Common mistakes and how to put them right
Thinking DELETE removes the whole table.
Put it right: Is that it removes rows, and the table definition remains.
Believing DELETE changes a value in a row.
Put it right: Is that UPDATE alters stored values, whereas DELETE removes whole rows.
Assuming a statement without WHERE deletes nothing.
Put it right: Is that it deletes every row in the table.
Placing the condition before FROM.
Put it right: Is that the table name follows FROM and the condition follows WHERE.
Exam tips
- Underline the table name and the condition in the statement before reading the options.
- Ask what happens to rows that do not meet the condition: they stay unchanged.
- Check whether the option keeps the table in existence, since deletion of rows is not deletion of the table.
Try the lesson
The start of the Structured query language (SQL): DELETE FROM table_name WHERE condition lesson, made from checked teaching notes for this specification point.
Have a go first
Which SQL keyword is used at the start of a statement that removes rows from a table?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Structured query language (SQL): DELETE FROM table_name WHERE condition
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge