我只是有一个 sql 疑问,实际上我需要为每个颜色值多次使用更新查询......每次检查每种颜色的条件变得很困难......
在批量“更新”下面是否有任何单个 sql 语句可以执行?请告诉我..
update `myTable` set `COLOR`='white' WHERE `CATEGORY` = 'Dress' and `NAME` like '%white%'
update `myTable` set `COLOR`='red' WHERE `CATEGORY` = 'Dress' and `NAME` like '%red%'
update `myTable` set `COLOR`='blue' WHERE `CATEGORY` = 'Dress' and `NAME` like '%blue%'
update `myTable` set `COLOR`='pink' WHERE `CATEGORY` = 'Dress' and `NAME` like '%pink%'