dhl:SQL_游标.sql

--游标变量
declare @pingcoid  varchar(50)

declare cur cursor fast_forward for
select top 300 pingcoid from OpenDoor.Userinfo order by point desc
open cur
fetch cur into  @pingcoid
while @@fetch_status =0
begin
--循环


fetch next from cur into @pingcoid
end
close cur
deallocate cur

 

posted @ 2010-07-15 14:14  肚肚  阅读(130)  评论(0编辑  收藏  举报