update a set sum = sum + 100 where uid = '1'; 如果没有uid为1的记录,就不更新,语句正确。
update a set sum = sum + 100 where uid = '1'; //一个不存在的uid if sqlca.sqlcode < 0 then messagebox("err","update error!") rollback; return end if 加update a set sum = sum + 100 where uid = '1' using sqlca;
如果没有uid为1的记录,就不更新,语句正确。
if sqlca.sqlcode < 0 then
messagebox("err","update error!")
rollback;
return
end if
加update a set sum = sum + 100 where uid = '1' using sqlca;