1:update 时做检查使用update mw_contract set payTimes=( case when payTimes>0 then payTimes-1 else payTimes end )where contractNo=‘2015001‘; 2:select时使用 select case when payTimes>0 then payTimes-1 else payTimes end payTimes from mw_contract;
时间: 2024-10-27 17:05:12