UPDATE
ELI5 — The Vibe Check
UPDATE changes existing data in a table. It is the 'Update' in CRUD. ALWAYS use a WHERE clause with it — if you forget, you update every single row in the table. That is a bad day.
Real Talk
UPDATE is the SQL statement for modifying existing rows in a table. It sets new values for specified columns. A WHERE clause filters which rows are updated — without it, all rows in the table are modified. It triggers constraint checks and any relevant triggers.
Show Me The Code
-- ALWAYS use WHERE or you update ALL rows
UPDATE users
SET email = 'newemail@example.com'
WHERE id = 42;
When You'll Hear This
"UPDATE the user's profile when they save changes." / "I accidentally ran UPDATE without WHERE and updated 50,000 rows."
Related Terms
CRUD (Create, Read, Update, Delete)
CRUD is the four things you can do to data: Create it, Read it, Update it, Delete it. Literally every app ever made is just CRUD in a trenchcoat.
DELETE
DELETE removes rows from a table. It is the 'Delete' in CRUD. Like UPDATE, you MUST use a WHERE clause — without it, you delete everything in the table.
INSERT
INSERT is how you add new data to a database. It is the 'Create' in CRUD. You tell it which table, which columns, and what values to put in.
SELECT
SELECT is how you ask a database to give you data. It is the 'Read' in CRUD.
WHERE
WHERE is how you filter which rows a query affects. Without WHERE, SELECT returns everything, UPDATE changes everything, DELETE deletes everything.