加入收藏  广告服务  关于我们
 2004-6-21

关于游标的使用

发表:不详   阅读:次  关键字:不详   字体:[ ]

begin transaction
declare mycursor Cursor for
select stu_no,score,words from belind_console where college_id=@college_id
for update of score

open mycursor
while(0=0)
begin
    fetch next
    from mycursor
    into @stu_no,@hhg,@words
    if @@fetch_status<>0
    break
    else
              begin
        --do someting
             end
end
close mycursor
deallocate mycursor

 热门文章
 推荐信息