MSSQL 游标使用declare nn cursor staticfor select id from user open nnfetch next from nn into @idwhi
MSSQL 游标使用
declare nn cursor staticfor select id from user open nnfetch next from nn into @idwhile @@fetch_status = 0 begin --处理语句fetch next from nn into @idendclose nndeallocate nn