The UPDATE statement is used to modify the existing records in a table.
Below is a selection from the "Customers" table in the Northwind sample database:
The following SQL statement updates the first customer (CustomerID = 1) with a new contact person and a new city.
The selection from the "Customers" table will now look like this:
It is the WHERE clause that determines how many records will be updated.
The following SQL statement will update the PostalCode to 00000 for all records where country is "Mexico":
The selection from the "Customers" table will now look like this:
The selection from the "Customers" table will now look like this: