日期:2014-05-18 浏览次数:20556 次
declare [游标名] scroll cursor for select * from 临时表 open [游标名] fetch first from [游标名] into [变量] while(@@FETCH_STATUS <> -1) begin [处理的代码] fetch next from [游标名] into [变量] end close [游标名] deallocate [游标名] ------解决方案--------------------