The UPDATE statement is used to modify existing records in a table.


Basic Syntax

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;

Example

UPDATE cats
SET name = 'Whiskers'
WHERE cat_id = 3;

Multiple Columns

UPDATE cats
SET name = 'Mittens', age = 5
WHERE cat_id = 2;

Explanation: