declare @aa int
DECLARE authors_cursor CURSOR
FOR SELECT a1 FROM a
OPEN authors_cursor
FETCH NEXT FROM authors_cursor into @aa
while @@fetch_status=0
begin
update a set a1=3
--就是这个修改本条游标的字段如何写
end
close authors_cursor
deallocate authors_cursor
DECLARE authors_cursor CURSOR
FOR SELECT a1 FROM a
OPEN authors_cursor
FETCH NEXT FROM authors_cursor into @aa
while @@fetch_status=0
begin
update a set a1=3
--就是这个修改本条游标的字段如何写
end
close authors_cursor
deallocate authors_cursor
DECLARE authors_cursor CURSOR
FOR SELECT a1 FROM a FOR UPDATE
OPEN authors_cursor
FETCH NEXT FROM authors_cursor into @aa
while @@fetch_status=0
begin
update a set a1=@aa
FETCH NEXT FROM authors_cursor
end
close authors_cursor
deallocate authors_cursor你在试试看吧。。