MySQL: Search for a field, then replace another field in the same row.

Posted by Francisco on Stack Overflow See other posts from Stack Overflow or by Francisco
Published on 2010-05-13T01:39:28Z Indexed on 2010/05/13 1:44 UTC
Read the original article Hit count: 188

Filed under:

Sorry if the question is stupid but I'm newbie to MySQL and got stuck with this.

Let's suppose I have the following table in MySQL:

City.........Country.....Restaurants
Rome......Italy.............3032
Paris.......France........5220

I want to search for the city "Paris" and update the field "Restaurants" (replace 5220 with 5300).

What would be the right MySQL query?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about mysql