I can change a value with UPDATE ... SET ... WHERE.
I can remove rows with DELETE FROM ... WHERE.
I can say what happens when WHERE is left out.
Running the lesson
Predict: ask students to vote before running. The no-WHERE slip is the key idea of the lesson.
Run: after the 15, press Reset so students see the table come back. In a real database there is no Reset, so people test with SELECT before they UPDATE or DELETE.
Investigate: plays + 100 uses the old value. Ask what plays = 100 would do instead.
Tip to share: write the WHERE as a SELECT first, check the rows, then change SELECT * to DELETE.
The hard part (on purpose)
Remembering WHERE. Teach the habit: write it as a SELECT first, then change the first word.
When students get stuck
Every row changed. Ask: Does your query have a WHERE line? Fix: Press Reset, add the WHERE line, and run again.
Nothing changed. Ask: Does any row pass your WHERE test? Fix: Check the id or spelling against the table.
syntax error near DELETE Ask: Is FROM in the DELETE line? Fix: It is DELETE FROM table.
Stretch and support
Stretch: Raise the plays of every pop song by 10% with plays * 1.1, then look at the results.
Support: Give the UPDATE with the WHERE line missing and ask students to complete it.
Where it leads
Next lesson: designing a table, with keys that make each row unique.
What each step is for
Investigate: UPDATE and DELETE both work on the rows that pass WHERE, and on all rows if there is no WHERE. The SELECT after is how you check.