我正在尝试更新 mysql 中的行,但我必须使用 for 循环进行单值 mysql 查询的多次更新是
update table set column1='100' where id =1
update table set column1='100' where id =6
update table set column1='100' where id =14
我正在使用 for 循环多次运行具有不同 ID 的查询,我想运行单个查询来更新所有行。那可能吗?
我想做这样的事情
update table set column1='100' where id=1,6,14;