一个简单的函数问题
我写了如下的句子,可是无法出来效果,大家帮忙看看
declare @i int
select @i=count(*) from t_p_cp where xfddm='W' and dldm='W5'
declare @j int
while @j<=@i
begin
update t_p_cp set bm=(sno+50000) where xfddm='W' and dldm='W5'
continue
end
结果集:
866 866
867 867
868 868
不能达到预想的结果集
866 50866
867 50867
868 50868