时间: 2021-08-13 作者:daque
问: sybase保存进程,干什么实行到这一句就不实行了 select @nserialno = serialno from schedule where phonenum= @strphonenum and type = @ntype if @@rowcount = 0 begin ... end else begin ... end 上头的select截止是空记载集,保存进程一实行到空记载集,就会归来? 答:if exists(select @nserialno = serialno from schedule where phonenum= @strphonenum and type = @ntype)这个语句的论理有点题目? if exists 普遍是用来决定能否生存一致的记载?你此刻又要将生存的截止赋值?本来还不如写 if exists(select 1 from schedule where phonenum= @strphonenum and type = @ntype) 决定能否生存如许的记载,在实行相映的处置。