用一条语句试试
update 表 set 数据=(case 数据 when 1 or 5 then 数据
else (select 数据 from 表 aa
where cast(replace(a.时间,'时','') as int)
-cast(replace(时间,'时','') as int)=1
) - 数据
end
)
update 表 set 数据=(case 数据 when 1 or 5 then 数据
else (select 数据 from 表 aa
where cast(replace(a.时间,'时','') as int)
-cast(replace(时间,'时','') as int)=1
) - 数据
end
)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货