`
oxidy
  • 浏览: 162577 次
  • 性别: Icon_minigender_1
  • 来自: 吉林长春
社区版块
存档分类
最新评论

MSSQL 游标使用

阅读更多
declare nn cursor static
for select id from user 
open nn
fetch next from nn into @id
while @@fetch_status = 0 
begin
      --处理语句
	fetch next from nn into @id
end
close nn
deallocate nn
 

 

静态游标,定义办法

2
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics