mysql怎么把编号以3开头的产品单价下调百分之5

如题所述

update 表名 set 价格=价格*0.95 where 编号 like '3%'
涉及到保留位数 可以看下round
例如保留一位小数四舍五入
update 表明 set 价格=round(价格*0.95,1) where 编号 like '3%'
温馨提示:答案为网友推荐,仅供参考
相似回答