UPDATE and safe targeting
UPDATE changes existing records. Verify the target before you change it, and inspect what changed afterward.
Preview the target
First run a SELECT using the same WHERE condition you intend to use in UPDATE. A name may not be unique; use a stable key to identify the intended record.
SET the new values
UPDATE table_name SET column_name = value WHERE condition assigns the value to matching records. Separate multiple assignments with commas. Use single quotes around text values.
Protect other records
Without WHERE, every row is a target. A correct final result for one record is not enough: records outside the intended target must remain unchanged.
Verify the change
Inspect the affected record and count the changed rows. This exercise checks the final table against the intended change and the untouched records. Each run starts fresh.