急求一解,关于加减的问题
table:score
字段 score id
77 1
66 2
55 3
81 4
score小于80加5分 大于等于80 减5分
------解决方案--------------------select score = case when score <80 then score+5 else score-5 end, id from score
------解决方案--------------------update score set score = case when score < 80 then score + 5 else score - 5 end
------解决方案--------------------select score =(case when score <80 then score+5 else score-5 end), id from score
order by id