日期:2014-05-18 浏览次数:20577 次
declare mycursor CURSOR FOR .....
open cursor
fetch next from mycursor into .....
while @@FETCH_STATUS = 0
begin
---从游标里面得到数据的处理过程
-- 处理已经fetch的结果
-- 处理结束后再次fetch
fetch next from mycursor into .....
end
close mycursor
deallocate mycursor