ITeye博客

MSSQL 游标使用

oxidy · 2008-10-12 19:23 · Database · 数据库 · Markdown

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

 

 

静态游标,定义办法

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。