这个存储过程错在哪里?
运行下面这个存储过程,提示我游标是只读的,但明是for update of IDO(可以更新的呀,不好意思,菜鸟)
CREATE PROCEDURE [mycursor] AS
declare hu_mycursor scroll cursor
for select ID0 from depart for update of ID0
open hu_mycursor
declare @row int
set @row=@@cursor_rows
while @row>0
begin
declare @get_id int
fetch hu_mycursor into @get_id
if @get_id<200
update depart set ID0=ID0+ID0*0.2
where current of hu_mycursor
else
update depart set ID0=ID0-ID0+0.2
where current of hu_mycursor
set @row=@row-1
end
close hu_mycursor
deallocate hu_cursor