==================

DECLARE @A1 VARCHAR(10),@A2 VARCHAR(10),@A3 INT
DECLARE YOUCURNAME CURSOR FOR SELECT A1,A2,A3 FROM YOUTABLENAME
OPEN YOUCURNAME
fetch next from youcurname into @a1,@a2,@a3
while @@fetch_status<>-1
begin
update ... set ...=@a1,...=a2 ...-a3 where ...
......您要执行的操作写在这里
fetch next from youcurname into @a1,@a2,@a3
end
close youcurname
deallocate youcurname
DECLARE YOUCURNAME CURSOR FOR SELECT A1,A2,A3 FROM YOUTABLENAME
OPEN YOUCURNAME
fetch next from youcurname into @a1,@a2,@a3
while @@fetch_status<>-1
begin
update ... set ...=@a1,...=a2 ...-a3 where ...
......您要执行的操作写在这里
fetch next from youcurname into @a1,@a2,@a3
end
close youcurname
deallocate youcurname