日期:2014-05-17  浏览次数:21087 次

这个SQL该怎么写哦
表A:
ID   ,PRICE
001,2.8
002,3.2
003,2.5
004,3.6
005,5.8
007,10.5
008,5.0
调整PRICE,大于5的下调30%,小于等于5的上调20%,sql语句该怎么写?一条SQL语句不知道怎么实现,分开写就更麻烦了。

------解决方案--------------------
update tb
set price=price*case when price> 5 then 0.7
else 0.8 end