如果需要取到每一行的数据需要通过如下的方式:

declare @d int

declare cursor_tst cursor scroll for

select _id from users

open cursor_tst
fetch next from cursor_tst into @d
while(@@fetch_status=0)

begin

print @d
fetch next from cursor_tst into @d

end

deallocate cursor_tst

posted on 2016-08-15 02:41  PerryXiang  阅读(83)  评论(0)    收藏  举报