Using the where clause with update

The where clause specifies which rows are to be updated. For example, in the unlikely event that Northern California is renamed Pacifica (abbreviated PC) and the people of Oakland vote to change the name of their city to Big Bad Bay City, here is how you can update the authors table for all former Oakland residents whose addresses are now out of date:

update authors 
set state = "PC", city = "Big Bad Bay City" 
where state = "CA" and city = "Oakland" 

You need to write another statement to change the name of the state for residents of other cities in Northern California.