有一张goodsinfo表,表中某一列的值(number类型)需要按比例更新。
可以这样写吗?
update goodsinfo set price=price*1.5 where id in(...);
有一张goodsinfo表,表中某一列的值(number类型)需要按比例更新。
可以这样写吗?
update goodsinfo set price=price*1.5 where id in(...);
不太明白你的按比例更新是啥意思?
你这样写是没问题的,但你要明白这样写只是把id在括号内的那些行每行的price变成原来的1.5倍。如果你需求就是这样,那就写成这样