一条mysql update if then 语句

来源:互联网 发布:信贷审批业务流程优化 编辑:程序博客网 时间:2024/06/05 18:35
update driver_online set vRemainCapacity= case when (vRemainCapacity>0) and ((vRemainCapacity-0.5) >0) then vRemainCapacity-0.5  else 0 end 
where driverId = 'DR120161118100001
0 0
原创粉丝点击