UPDATE Records

UPDATE modifies existing rows in a table.

UPDATE users
SET city = 'Bangalore'
WHERE name = 'Alice';
  • SET: Specifies the columns to change
  • WHERE: Ensures only targeted rows are changed

Without a WHERE clause, all records will be updated (be cautious!).

← PrevNext →