假设MySQL有一张表 tool格式如下:
tool
现在需要把所有“工具”的used_count自增2,如何用一句SQL语句实现:
update tool set used_count = used_count + 2 where category='工具'