mysql - How to set in table for all records with same name the same id number of column -


how set same number 'priority' 1 query mercedes.

 +---------------------+-------------+-------------+ |        cars         |    place    |   priority  | +---------------------+-------------+-------------+ |aston martin         |moscov       |1            | |mercedes benz        |paris        |3            | |aston martin         |moscov       |1            | |ferrari testarossa   |new york     |2            | |ferrari testarossa   |moscov       |2            | |subaru impreza       |paris        |4            | |aston martin         |paris        |1            | |aston martin         |new york     |1            | |mercedes benz        |moscov       |3            | |subaru impreza       |new york     |4            | +---------------------+-------------+-------------+ 

update table_name set priority = 1 cars = 'mercedes benz' 

Comments