第一个游标
[ 2007-8-29 16:32:00 | By: 99love ]
declare f_cur cursor for select [id],[status] from dbo.paypal for update of status;
declare @id bigint
declare @status bit
open f_cur
fetch next from f_cur into @id,@status
while(@@fetch_status=0)
begin
print 'id:'+cast(@id as varchar)+', status:'+cast(@status as varchar)
update dbo.paypal set status=~status where current of f_cur
fetch next from f_cur into @id,@status
end
close f_cur
deallocate f_cur
- 上一篇:超经典澡堂搓澡大全
- 下一篇:互联网:“中国式”抄袭




