🗄️ Databases
UPDATE & DELETE — Changing Your Data
UPDATE changes existing rows. DELETE removes rows. ALWAYS use a WHERE clause with both — otherwise you'll change or delete EVERY row! It's a good habit to check which rows match your WHERE first with a SELECT, then run the UPDATE or DELETE.
3 min 10 XP Lesson 7 of 11

UPDATE changes existing rows. DELETE removes rows. ALWAYS use a WHERE clause with both — otherwise you'll change or delete EVERY row! It's a good habit to check which rows match your WHERE first with a SELECT, then run the UPDATE or DELETE.
Quick Quiz
What happens if you forget WHERE on a DELETE?