UPDATE
Modifies existing rows in a table. Always use WHERE to avoid updating all rows.
Syntax
sql
UPDATE table SET col = val WHERE condition;Example
sql
UPDATE users
SET last_login = NOW()
WHERE id = 42;Modifies existing rows in a table. Always use WHERE to avoid updating all rows.
UPDATE table SET col = val WHERE condition;UPDATE users
SET last_login = NOW()
WHERE id = 42;