SQL Updating Specified Rows


Example

This example uses the Cars Table from the Example Databases.

UPDATE 
    Cars
SET 
    Status = 'READY'
WHERE 
    Id = 4

This statement will set the status of the row of 'Cars' with id 4 to "READY".

WHERE clause contains a logical expression which is evaluated for each row. If a row fulfills the criteria, its value is updated. Otherwise, a row remains unchanged.