SQl server更新某阶段的匹配关系。

DECLARE @count INTEGER
DECLARE @id INTEGER
DECLARE @subjectID INTEGER
SET @count=1
SET @id =11894
SET @subjectID=151426

while @count<20
begin
update biomaterial set subject_id=@subjectID where id =@id

SET @count = @count +1
SET @id = @id +1
SET @subjectID =@subjectID +1

end

原文地址:https://www.cnblogs.com/keepSmile/p/9634624.html